On Tue, 23 Jan 2001, Kevin D. Clark wrote:

> [EMAIL PROTECTED] writes:
>
> > 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.
>
> Your description here is extremely confusing.  You've got two
> asterisks here (which probably doesn't matter much -- "disk**" doesn't
> glob to anything different than what "disk*" would have), and you say
> that "disk*" is a variable instead of more properly referring to it as
> the value of a variable (the variable seems to be "$1" here).
>
> As a wild shot in the dark, try "ls $1*/*.jpg" .
>
Well, when I try "ls disk*/*.jpg > file" the file shows all three
directories and their .jpg files. When i put the same line in the script
it only keeps the contents of disk1 in the file. Since disk** doesn't
glob to anything different than disk*, then putting the / in the script
causes // to be put into the file when i only run it agains a single
directory. Not a big problem, but putting "$1*/*.jpg" into the script
could become a big problem when I run it against a single directory.

-- 
Thomas M. Albright
Albright Enterprises - "The Small Business Solution"
http://www.albrightent.com/


**********************************************************
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