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 8517
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: Adding arbitrary data at the end of a script
- Date: Thu, 17 Feb 2005 12:23:29 +0100
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <20050217093609.GA25163@xxxxxxxxx>
- Mail-followup-to: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050217091256.GA941@DervishD> <20050217093609.GA25163@xxxxxxxxx>
Hi Wayne :)
* Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx> dixit:
> 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
Wayne, thanks for showing me how utterly stupid I am O:))) I knew
about this feature, but I thought that it was a zsh thing, non
portable. I didn't even look that in SUS. I just looked a moment ago
to make sure it was non portable and SUS specifies just the same :((
Well, thanks for your help because you're solved my problem. I
didn't even think about using this mechanism O:)
> 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.
I think that I will substitute it with the name of the file that
must be generated so the filtering in the sed script is easier.
Thanks a lot, Wayne :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author