[plug] Here documents

Bernd Felsche bernie at innovative.iinet.net.au
Fri Oct 3 16:02:22 WST 2003


On Fri, Oct 03, 2003 at 12:12:38PM +0800, Cameron Patrick wrote:
> On Fri, Oct 03, 2003 at 12:01:03PM +0800, David Buddrige wrote:
> 
> | cat <<EOF
> | some text that
> | I want to add
> | to the end of my
> | file
> | EOF
> | >>somefile.txt
> 
> Try moving the ">>somefile" to the top line, like so:
> 
> cat >>somefile.txt <<EOF
> blah
> EOF

i.e. make the redirection apply to the cat command ;-)

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list