You are not logged in.
Hellow there fellow crunchbangers...i hope somebody can lighten me up.
What i'm trying to achieve is to submit a search with
find ~/ -name "*.jpg" | gpicview to pipe the results to gpicview...
Obviously this doesn't work (or else i wouldn't be posting).
My question is, how to do such a thing? Pipe results from a search to see the pictures with some image-viewer? Whitout the need to copy them before to a temp directory, of course.
Anybody knows a method? Any ideas?
Would be a for...loop in the search results a better way to do it?
As i'm still newbee with the command line, all replies are welcome.
Thank You for Your attention.
...selfmade-wannabee #!in' pirate. Arrr!
Offline
Try this:
gpicview `find ~/ -name "*.jpg"`Offline
The problem is gpicview only takes one argument. ( Once you've opened an image you can browse to all the other images in that folder though. )
In general, to send the results of a "find" search to some program you can use "xargs" like this:
find -name '*.txt' -print0 | xargs -0 geditwill open all the *.txt files in tags in gedit. (The -print0 and -0 options are to protect you from files with spaces or newlines in their names.)
John Please help us keep your forums manageable.
--------------------
( a boring Japan blog , idle twitterings and GitStuff )
#! forum moderator
Offline
what about :
find ~/ -name "*.jpg" | while read line
do
gpicview $line &
donethis should open each match in a new window
Offline
gpicview will automatically show pictures added to its current directory so
mkdir /tmp/pictures
for PIC in $(find ~/ -name *.jpg); do
ln -s $PIC /tmp/pictures ( or if you prefer cp $PIC /tmp/pictures)
done
gpicview /tmp/pictures/*
rm -r /tmp/picturesuntested but should work, you'll only get one instance of gpicview.
- - - - - - - - Wiki Pages - - - - - - -
#! install guide *autostart programs, modify the menu & keybindings
configuring Conky *installing scripts
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.