printf in bash
Peter
plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Thu Jun 15 18:11:26 UTC 2006
On Thu, 15 Jun 2006, Neil Watson wrote:
> On Thu, Jun 15, 2006 at 08:25:46PM +0300, Peter wrote:
>> plp at plp:~$ cat <<END
>>> This is line two with quotations ""
>>> END
>
> What about quoting the string so that no special characters are
> interpreted? The eqiuvilant of using single quotes?
What about it ? Special characters are not interpreted in the
here-document. They are interpreted by the shell when and if this here
document appears on a shell command line later. E.g.:
Q=`cat <<END
This is a line with a "$variable" in it
EOF`
echo $Q
echo "$Q"
Peter
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list