[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2007 ]

Re: [edlug] Shell scripts



Andrew Neil Ramage wrote:
> 
> 1) Yes
> 2) They will dorm a single line.  To put things on their own line, use C
> escape sequences.
> 
>   eg echo <some text> \n

cat is your friend:

cat << EOM
foo, bar
gronk
EOM

You can redirect and use variables too:

cat << EOM > /etc/foo
bar $FOO
EOM

-- 
_ __/|  William Anderson      |  Tim: Your cheese game is strong.
\`O_o'  neuro at well dot com | Zane: My cheese game. It's all about the
=(_ _)= http://neuro.me.uk/   |       cheese platter.
   U  - Thhbt! GPG 0xFA5F1100 | -- Tim Westwood, Zane Lowe, R1, Dec 2005

-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html



This archive is kept by wibble+RM@xxx.xxx.xxx
Morpheux
HomePage