Re: loop through records

2009-03-11 Thread Tony Zanella
awk may be a help here. Using it, you can refer to fields, like so: $ cat f1 187431346 0323 mirrored 11866 187431346 0324 mirrored 11866 187431346 0325 mirrored 11866 187431346 0326 mirrored 11866 $ awk '{print $1;print$2}' f1 187431346 0323 187431346 0324 187431346 0325 187431346 0326 On Wed

Re: implementing flow control in bash

2008-10-22 Thread Tony Zanella
Works perfectly, thanks! I'll study up on the syntax... Tony On Tue, Oct 21, 2008 at 5:30 PM, Bernd Eggink <[EMAIL PROTECTED]> wrote: > Tony Zanella schrieb: >> >> Hello all, >> I'm sure this isn't a bug, but just my inability to wrap my head >> ar

implementing flow control in bash

2008-10-21 Thread Tony Zanella
Hello all, I'm sure this isn't a bug, but just my inability to wrap my head around enough of bash flow control: I wrote the following shell script to find all gifs in a directory. Then use "identify" from imagemagick to grab the gif width. Then, print the image name and width to a file. for i in

how do I write a shell script to batch rename files in a directory?

2008-08-29 Thread Tony Zanella
Hello all, I have a directory listing of files like: img.bc03.547.1.gif? I need to trim the last character off for each file in the dir. I know I can use: mv img.bc03.547.1.gif? img.bc03.547.1.gif to rename each by hand, but I want to do this as a batch. I know it would start with: for files in *;