The Squirrel portable shell and scripting language (developerWorks)
The Squirrel portable shell and scripting language (developerWorks)
Posted Mar 19, 2009 14:54 UTC (Thu) by Tuxie (guest, #47191)Parent article: The Squirrel portable shell and scripting language (developerWorks)
How do you do the following typical shell-pattern in Squirrel?
cat /tmp/foo*.txt | grep -v ^bar | sed 's:foo:bar:g' | myprogram
Posted Mar 20, 2009 9:48 UTC (Fri)
by odie (guest, #738)
[Link] (1 responses)
Quoting the Squirrel shell manual: I believe it is done with variables, but I don't know any Squirrel, so can't comment on whether it's usable or not. Oh, and by the way, I believe there is an award for the kind of blatant overuse of pipes in your example. Next time, try:
Posted Mar 21, 2009 22:46 UTC (Sat)
by mp (subscriber, #5615)
[Link]
The Squirrel portable shell and scripting language (developerWorks)
"Squirrel Shell 1.0rc2 and newer support input, output and error streams redirection for child processes."
sed '/^bar/ ! s:foo:bar:g' /tmp/foo*.txt | myprogramThe Squirrel portable shell and scripting language (developerWorks)
Next time, try:
sed '/^bar/d; s:foo:bar:g'
