Yesterday, Thomas M. Albright gleaned this insight:

> I just finished writing a shell script. Well, not really cause it
> doesn't do what I want yet. Anyway:
> 
> I have a pictures directory. in that directory are three more called
> disk1, disk2, and disk3.
> 
> What the script is *supposed* to do is "ls $1*.jpg" but when I use disk*
> as the variable, all I get back is the contents of disk1.
> 
> The script, when complete, will take $1*.jpg and use convert (from the
> ImageMagik package) to create thumbnails and a webpage for displaying.
> 
> I can post the whole script if y'all want, but I need help please!

Your description is a bit unclear, but I think I've muddled my way
through it. It sounds to me like you're calling the script like this:

  script disk*

If that's it, then the shell expands disk* before your script executes
even one line, so what you are actually doing is essentially:

  script disk1 disk2 disk3

and $1 is in fact only disk1.

It might work if you called it like this:

  script 'disk*'

But I'm not really sure... shell quoting is absolutely THE trickiest part
of shell programming, and I don't have time to play with it right now...


-- 
You know that everytime I try to go where I really want to be,
It's already where I am, cuz I'm already there...
------------------
Derek D. Martin
Unix/Linux Geek
[EMAIL PROTECTED]
------------------


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to