Hya,
Following is the digest of my code
Code:
#!/bin/tcsh
foreach a ("`cat inputfile`")
++ do some work for each line ++
end
and I want to pipe entire output into "sort".
I can do
Code:
myProgram inputfile | sort
, but I want everything in one shell script for easier maintenance. So I tried to send foreach to subshell
Code:
#!/bin/tcsh
(
foreach a ("`cat inputfile`")
++ do some work for each line ++
end
) | sort
and tcsh chokes saying too many ('s.
Question is
How to send foreach to subshell?
Or any other idea?
My tcsh is 6.14.00 Astron 2005-3-15 (Debian etch one)
Thanks
Happy Penguins!