[geeks] ksh for loop question
doctor obnox son of a bitch
drobnox at visi.com
Sat May 11 13:24:09 CDT 2002
On Sat, May 11, 2002 at 01:55:57PM -0400, Greg A. Woods had the audacity to opine:
> [ On Saturday, May 11, 2002 at 11:45:15 (-0500), doctor obnox son of a bitch wrote: ]
> > Subject: Re: [geeks] ksh for loop question
> >
> > On Fri, May 10, 2002 at 08:05:10PM -0400, Brian Hechinger had the audacity to opine:
> > > On Fri, May 10, 2002 at 06:38:31PM -0500, doctor obnox son of a bitch wrote:
> > > >
> > > > cat file_list.txt| awk print '{wget "http://www.server.com/" $1}' | sh
> > >
> > > nice.
> > >
> > > -brian
> > > --
> >
> > Except it has a great big ugly typo:
> > it should be
> >
> > cat file_list.txt| awk '{print "wget "http://www.server.com/" $1}' |sh
>
> You should really try testing what you type before you post it! :-)
>
that's a given...thank you for pointing it out to me....twice
> (and thinking a wee tiny bit harder about eliminating the most obvious
> unnecessary overhead and uglyness -- cat should be banned!)
>
I just posted the way I'd do it myself, while sitting at a prompt.
In such a circumstance, I could care less about efficiency and elegant
design...I just type stuff, see what the output is, hit command history,
add another step to the pipeline, and try again. Lather, rinse, repeat,
until I get what I want. As long as it works, I'm okay.
If writing a shell script for production use, I'd probably take a much
different approach.
--
Here's that flapjack ........Eric J. Gustafson
Put it in your pocket, 'til I get back .........................
Goin' downtown, to see a man .........................
Ain't got time to shake your hand .........drobnox at visi.com
More information about the geeks
mailing list