On Mon, Nov 10, 2008 at 21:40, Rob Dixon <[EMAIL PROTECTED]> wrote: > John W. Krahn wrote: >> >> Why not just: >> >> ipaddy=`awk '{ print $1 }' ipin.txt` >> >> But that still doesn't get you a comma-separated list. > > Erm, a Perl list? > > Rob
Hey, if you throw an @ in front of ipaddy you get a Perl list. But I think the answer that is really wanted is ipaddy=$(perl -lne 'push @a, (split)[0];END {print join ",", @a}' file_with_the_data); -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/