Re: Help Understanding While Loop

2005-10-16 Thread Eric F Crist
On Oct 15, 2005, at 5:59 PM, Drew Tomlinson wrote: On 10/14/2005 3:24 PM David Kirchner wrote: On 10/14/05, Drew Tomlinson <[EMAIL PROTECTED]> wrote: OK, I've been working on an sh script and I'm almost there. In the script, I created a 'while read' loop that is doing what I want. Now

Re: Help Understanding While Loop

2005-10-16 Thread Drew Tomlinson
On 10/15/2005 11:33 PM Parv wrote: in message <[EMAIL PROTECTED]>, wrote Drew Tomlinson thusly... Thus I set the following variables: remote_pictures_dir="/multimedia/Pictures" local_pictures_dir="/tv/pictures" find_args="-iname '*.jpg' -or -iname '*.gif'" Then I called the 'find' command

Re: Help Understanding While Loop

2005-10-15 Thread Parv
in message <[EMAIL PROTECTED]>, wrote Drew Tomlinson thusly... > > Thus I set the following variables: > > remote_pictures_dir="/multimedia/Pictures" > local_pictures_dir="/tv/pictures" > find_args="-iname '*.jpg' -or -iname '*.gif'" > > Then I called the 'find' command as follows: > > for origi

Re: Help Understanding While Loop

2005-10-15 Thread Drew Tomlinson
On 10/14/2005 3:24 PM David Kirchner wrote: On 10/14/05, Drew Tomlinson <[EMAIL PROTECTED]> wrote: OK, I've been working on an sh script and I'm almost there. In the script, I created a 'while read' loop that is doing what I want. Now I want to keep track of how many times the loop execute

Re: Help Understanding While Loop

2005-10-15 Thread Jan Grant
On Fri, 14 Oct 2005, Will Maier wrote: > > count = $(( count + 1 )) > ^^^ > > You're missing something here ;) Actually, you don't need the leading "$". With it, you'll get variable interpolation, which'll normally do the same thing. Once the expression has been interpolated, it'

Re: Help Understanding While Loop

2005-10-14 Thread David Kirchner
On 10/14/05, Drew Tomlinson <[EMAIL PROTECTED]> wrote: > OK, I've been working on an sh script and I'm almost there. In the > script, I created a 'while read' loop that is doing what I want. Now I > want to keep track of how many times the loop executes. Thus I included > this line between the '

Re: Help Understanding While Loop

2005-10-14 Thread Will Maier
On Fri, Oct 14, 2005 at 02:48:19PM -0700, Drew Tomlinson wrote: > OK, I've been working on an sh script and I'm almost there. In > the script, I created a 'while read' loop that is doing what I > want. Now I want to keep track of how many times the loop > executes. Thus I included this line betw

Help Understanding While Loop

2005-10-14 Thread Drew Tomlinson
OK, I've been working on an sh script and I'm almost there. In the script, I created a 'while read' loop that is doing what I want. Now I want to keep track of how many times the loop executes. Thus I included this line between the 'while read' and 'done' statements: count = $(( count + 1 )