[Techtalk] filtering command line
Miriam English
mim at miriam-english.org
Mon Jun 11 15:30:25 UTC 2007
Feedback for anybody attempting something similar...
I made this simple script:
#! /bin/sh
if [ $1 = "" ]; then
wine c:\\irfanview\\i_view32.exe
else
echo "z:$@" | tr '/' '\\' > /tmp/iview_start
export iview_start=`cat /tmp/iview_start`
wine c:\\irfanview\\i_view32.exe "$iview_start"
fi
I know it is kinda messy, but making this the default action for picture
files starts irfanview under wine and loads the clicked picture. I'm
delighted with this because irfanview is the fastest, smallest, most
full-featured picture viewer I've yet found. It's just a shame that it's
made for MSWindows. Well, now I have it in my Puppy Linux. :)
By the way, I put the script in my binaries path (type "echo $PATH" into
a shell to see that). Also I am using a bash shell so use "export" to
set a variable. If you use a different shell you may need to use "set".
If I have done this an unnecessarily complicated way and there is a much
better way please let me know. I'd be rapt to learn more.
Best wishes to you all,
- Miriam
--
---------=---------=---------=---------=---------=---------=------
A life! Cool! Where can I download one of those from?
---------=---------=---------=---------=---------=---------=------
Website: http://miriam-english.org
Blog: http://miriam-e.livejournal.com
More information about the Techtalk
mailing list