3

I frequently open several (~10) figures that I want to compare. I have always generated them using an eps format then used evince to open the set I want to compare using something like

evince set1*.eps &

Unfortunately my figures are getting too many features to effectively use evince, e.g., 100000 circles. I can just as easily generate them as a raster image, e.g., png, but when I open them using Eye of Gnome, it uses the same window for each one which does not work for comparing

eog set1*.png &

I know I can run something like

eog set1*1.png &
eog set1*2.png &
eog set1*3.png & 
...

but is there a simple bash command to get a separate window for each? I did not find anything on the Gnome help page.

2
  • You can always just run it all in one line: eog set1*1.png & eog set1*2.png & eog set1*3.png...
    – Daniel
    Oct 15 '15 at 1:04
  • I realize that but I am looking for something more simple that works well with wild cards. Oct 15 '15 at 3:34
4

A simple loop could do the trick:

for i in set1*.png; do eog -n "$i" & done
5
  • This is perfect! This essentially duplicates the functionality I like about eps files and evince. Oct 15 '15 at 3:35
  • @stvn66 you could make a function and add it to your .bashrc: eogn () { for i; do eog -n "$i"; done; }, and then call eogn set1*.png.
    – muru
    Oct 15 '15 at 3:36
  • The eogn as written opens them one at a time. I tried adding an & but that did not work. I'm sure I could put it in a bash script but as is, the solution is not too much to type I think. Oct 15 '15 at 3:42
  • @stvn66 ah, yes, it should have been eog -n "$i" & done; }, though I'm not sure why it didn't work after you corrected that.
    – muru
    Oct 15 '15 at 3:44
  • That works. I forgot to remove the ; and only changed it to `eog -n "$i" &; done; } . This is great, thanks! Oct 15 '15 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.