!-- On Mon 26.Aug'13 at  0:12:19 BST, Dan Espen (des...@verizon.net), wrote: 

> Dan Espen <des...@verizon.net> writes:
> 
> > Try replacing '*.jpg' with just '*'.
> >
> > *.* is from Windows .BAT files.
> >
> > When referring to $i, always include quotes like this:
> >
> >    do echo AddToMenu JpgMenu "`basename "$i"`" Exec xv "$i"; done'
> >
> > (You need the quotes to handle file names with spaces.)
> >
> > Instead of 'Exec xv' do:
> >
> > Exec exec my-handle-file.
> >
> > Where "my-handle-file" is a shell you write that figures out what
> > program to execute.
> >
> > In my-handle-file figure out what to execute based on $1:
> >
> >     case "$1" in
> >     *.jpg) exec xv $1;;
> >     *.doc) exec ooffice $1;;
> >     *) echo "say what";;
> >     esac
> 
> (Oops, of course quotes around all the references to $1,
> and my-handle-file must be a shell with execute permission
> and in your $PATH.)


Hi Dan, thanks very much for explaining that. It makes sense to me now. I
will try out some new menus using this approach. 

It's very coold being able to do stuff like this. I really need to extend
my shell skills so I can do more cools things. 

Cheers, Jamie.

-- 


James Griffin:  jmz at kontrol.kode5.net

[A4B9 E875 A18C 6E11 F46D  B788 BEE6 1251 1D31 DC38]

Reply via email to