Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Adding arbitrary data at the end of a script
- X-seq: zsh-users 8516
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Adding arbitrary data at the end of a script
- Date: Thu, 17 Feb 2005 01:36:09 -0800
- In-reply-to: <20050217091256.GA941@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050217091256.GA941@DervishD>
On Thu, Feb 17, 2005 at 10:12:56AM +0100, DervishD wrote:
> #!/bin/zsh
> true
> exit 0
> cat << DATA.EOF > /dev/null
> <Text data that contains some '$', backticks, etc.>
> DATA.EOF
You just need single quotes around the DATA.EOF to tell zsh to treat the
data literally:
#!/bin/zsh
true
exit 0
cat << 'DATA.EOF' > /dev/null
<Text data that contains some '$', backticks, etc.>
DATA.EOF
You could drop the ">/dev/null" too, if you wanted (since the line will
never get executed). You could even substitute another program for
"cat" (such as "true" or "MadeUpNameOfMissingCommand") if you want to
make the line more distinctive.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author