[ale] Read multiple variables

Michael B. Trausch mbt at naunetcorp.com
Thu Sep 12 08:54:02 EDT 2013


On 09/12/2013 08:44 AM, leam hall wrote:
> grep person /etc/passwd | awk -F":" '{ print $3, $4, $5 }' |while read
> U G C
> do
>  echo U is $U, G is $G, and it's $C"
> done

Of course, that'll work too.  :-)

I used an explicit subshell out of habit... became habitual for me back
when I was writing a lot of shell scripts on my system to control other
systems via telnet.  Had to do it that way because we weren't allowed to
"modify the platform" by "installing scripts on it", but they never said
anything about making scripts to automate the shell itself on my local
system... :-D

    --- Mike

-- 
Naunet Corporation Logo 	Michael B. Trausch

President, *Naunet Corporation*
? (678) 287-0693 x130 or (855) NAUNET-1 x130
FAX: (678) 783-7843

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130912/b934bc25/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dghifedb.png
Type: image/png
Size: 1701 bytes
Desc: not available
URL: <http://mail.ale.org/pipermail/ale/attachments/20130912/b934bc25/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://mail.ale.org/pipermail/ale/attachments/20130912/b934bc25/attachment.sig>


More information about the Ale mailing list