Piping here documents

Dave Corcoran dave at aspect.UUCP
Wed Feb 13 06:33:52 AEST 1991


> For a one liner
> works just fine, but if the rest of the commands (here just sed) don't
> fit on a line this doesn't work. The best that I could come up with was:

#!/bin/sh
cat <<@@ | sed '
s/1/a/
s/2/b/
s/3/c/
s/4/e/
'
11
22
33
44
55
@@

-- 
David Corcoran		      -@@
uunet!aspect!dave	        ~
In a society where anything goes eventually everything will.



More information about the Comp.unix.shell mailing list