Re: bash shell scripting questions

2001-01-24 Thread Kevin D. Clark
[EMAIL PROTECTED] writes: >echo -n "<$i>" >> /tmp/tn.html Of course, "echo -n" isn't portable to all Unices. (it doesn't work with SYSV-influenced /usr/bin/echo's) (but for this use I wouldn't worry about it too much) --kevin -- "It is easier to port a shell than a shell scr

Re: bash shell scripting questions

2001-01-24 Thread Derek Martin
On Wed, 24 Jan 2001, Paul Lussier wrote: > In a message dated: Wed, 24 Jan 2001 12:38:20 EST > "Thomas M. Albright" said: > > ># Create the base web-page > > touch thumbnails.html > > echo "" >> thumbnails.html > > echo "" >> thumbnails.html > > echo "Thumbnails" >> thumbnails.html > >

Re: bash shell scripting questions

2001-01-24 Thread Paul Lussier
In a message dated: Wed, 24 Jan 2001 12:38:20 EST "Thomas M. Albright" said: ># Create the base web-page > touch thumbnails.html > echo "" >> thumbnails.html > echo "" >> thumbnails.html > echo "Thumbnails" >> thumbnails.html > echo "" >> thumbnails.html > echo "" >> thumbnails.html

Re: bash shell scripting questions

2001-01-24 Thread Thomas M. Albright
Thanks to everyone who helped! I got the script to work, especially tanks to Larry. The results can be found at: http://www.tarogue.net/~tom/pictures/ The final script itself follows: < --- Begin My Script --- > #!/bin/bash # Set counter for thumbnail-naming COUNT=1 # If the output file alread

Re: bash shell scripting questions

2001-01-24 Thread Paul Lussier
In a message dated: Wed, 24 Jan 2001 10:02:39 EST "Thomas M. Albright" said: >On Wed, 24 Jan 2001, Tilly, Lawrence wrote: > >> Try this: >> >>#!/usr/bin/ksh >>for DIRECTORY in "$@"; do >> echo $DIRECTORY >> ls $DIRECTORY >>done >> >Do I need to use ksh? I really don't know

RE: bash shell scripting questions

2001-01-24 Thread Tilly, Lawrence
able (I think it does). -Larry > -Original Message- > From: Thomas M. Albright [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, January 24, 2001 10:03 AM > To: Tilly, Lawrence > Cc: [EMAIL PROTECTED] > Subject: RE: bash shell scripting questions > > On We

RE: bash shell scripting questions

2001-01-24 Thread Thomas M. Albright
On Wed, 24 Jan 2001, Tilly, Lawrence wrote: > Try this: > >#!/usr/bin/ksh >for DIRECTORY in "$@"; do > echo $DIRECTORY > ls $DIRECTORY >done > Do I need to use ksh? I really don't know much (read: anything) about that shell. Would the same for loop work in bash? -- Thoma

Re: bash shell scripting questions

2001-01-24 Thread Thomas M. Albright
On Wed, 24 Jan 2001, Benjamin Scott wrote: > On Tue, 23 Jan 2001, Thomas M. Albright wrote: > > I just finished writing a shell script. Well, not really cause it > > doesn't do what I want yet. Anyway: > > Nobody has asked this yet: What is it that you want it to do? :-) > Make a web-page of

Re: bash shell scripting questions

2001-01-24 Thread Thomas M. Albright
On Wed, 24 Jan 2001, Michael O'Donnell wrote: > >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. > > Le

Re: bash shell scripting questions

2001-01-24 Thread Derek Martin
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

RE: bash shell scripting questions

2001-01-24 Thread Tilly, Lawrence
] > Sent: Wednesday, January 24, 2001 8:09 AM > To: [EMAIL PROTECTED] > Subject: Re: bash shell scripting questions > > > > >I have a pictures directory. in that directory are > >three more called disk1, disk2, and disk3. > > > >What the script is

Re: bash shell scripting questions

2001-01-24 Thread Kevin D. Clark
[EMAIL PROTECTED] writes: > Let's say that you've named your script tomScript. > From your description it sounds like you're invoking > it thus: > >tomScript disk* > > and then expecting to see the string "disk*" as the > first argument. Now that you mention this, I'll bet that this is

Re: bash shell scripting questions

2001-01-24 Thread Benjamin Scott
On Tue, 23 Jan 2001, Thomas M. Albright wrote: > I just finished writing a shell script. Well, not really cause it > doesn't do what I want yet. Anyway: Nobody has asked this yet: What is it that you want it to do? :-) -- Ben Scott <[EMAIL PROTECTED]> Net Technologies, Inc.

Re: bash shell scripting questions

2001-01-24 Thread Thomas M. Albright
On Wed, 24 Jan 2001, Kevin D. Clark wrote: > > [EMAIL PROTECTED] writes: > > > What bothers me is the fact that the command works from the command > > line, but not from within the script. I've never had this happen before! > > (Really!) > > What shell are you using at the command line? > echo $S

Re: bash shell scripting questions

2001-01-24 Thread Michael O'Donnell
>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. Let's say that you've named your script tomScript. >From your

Re: bash shell scripting questions

2001-01-24 Thread Kevin D. Clark
[EMAIL PROTECTED] writes: > What bothers me is the fact that the command works from the command > line, but not from within the script. I've never had this happen before! > (Really!) What shell are you using at the command line? What shell is running the shell script? Can you provide a small

Re: bash shell scripting questions

2001-01-24 Thread Thomas M. Albright
It's still only getting the file list from disk1. What bothers me is the fact that the command works from the command line, but not from within the script. I've never had this happen before! (Really!) On Tue, 23 Jan 2001, Bruce Dawson wrote: > Instead of 'ls', try: > > find $1 -name \*.jp

Re: bash shell scripting questions

2001-01-24 Thread Jerry Feldman
Note that ther find has an ls option. find $1 -name \*.jpg -ls Which will give you a more detailed listing then just the find with the (assumed) -print option. Bruce Dawson wrote: > Instead of 'ls', try: > > find $1 -name \*.jpg > > Note that you'll have to use '.' if you want all the f

Re: bash shell scripting questions

2001-01-24 Thread Peter Cavender
> > > 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

Re: bash shell scripting questions

2001-01-23 Thread Bruce Dawson
Instead of 'ls', try: find $1 -name \*.jpg Note that you'll have to use '.' if you want all the files in the current directory. --Bruce "Thomas M. Albright" wrote: > > I just finished writing a shell script. Well, not really cause it > doesn't do what I want yet. Anyway: > > I have a

Re: bash shell scripting questions

2001-01-23 Thread Thomas M. Albright
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. > > > >

Re: bash shell scripting questions

2001-01-23 Thread Kevin D. Clark
[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 wh

bash shell scripting questions

2001-01-23 Thread Thomas M. Albright
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