> i...@sheila:~$ set -x; echo "foo|bar|baz" | awk 'BEGIN{RS="|"}{ print
> $1 }' | while read s; do echo $s; f=$s; done;

[...@sheila:~]$ set -x; echo "foo|bar|baz" | awk 'BEGIN{RS="|"}{ print
$1 }' | while read s; do f=$s;echo $f; done;
+-zsh:116> set -x
+-zsh:116> echo 'foo|bar|baz'
+-zsh:116> awk 'BEGIN{RS="|"}{ print $1 }'
+-zsh:116> read s
+-zsh:116> f=foo
+-zsh:116> echo foo
foo
+-zsh:116> read s
+-zsh:116> f=bar
+-zsh:116> echo bar
bar
+-zsh:116> read s
+-zsh:116> f=baz
+-zsh:116> echo baz
baz
+-zsh:116> read s

That does it too.
-- 
Regards,
Ishwor Gurung
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to