Re: Script challenge
On Sat, Jan 14, 2006 at 02:39:17PM +0200, Simo Kauppi wrote:
> On Sat, Jan 14, 2006 at 11:37:42AM +0100, John Smith wrote:
> >
> > #!/bin/sh
> > cat <<EOF >newscriptfile.sh
> [snip]
> > It's driving me nuts!!!
>
> Depending on what you want cat to the newscriptfile.sh, you need to
> escape all the $s to prevent the parameter expansions.
alternatively, you can put quotes around the first EOF, like this
#!/bin/sh
cat <<"EOF" >newscriptfile.sh
...
EOF
which keeps things somewhat more readable...
Almut
Reply to: