From: DervishD <zsh@dervishd.net>
To: Wayne Davison <wayned@users.sourceforge.net>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Adding arbitrary data at the end of a script
Date: Thu, 17 Feb 2005 12:23:29 +0100 [thread overview]
Message-ID: <20050217112329.GB1089@DervishD> (raw)
In-Reply-To: <20050217093609.GA25163@blorf.net>
Hi Wayne :)
* Wayne Davison <wayned@users.sourceforge.net> 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...
prev parent reply other threads:[~2005-02-17 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-17 9:12 DervishD
2005-02-17 9:36 ` Wayne Davison
2005-02-17 11:23 ` DervishD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050217112329.GB1089@DervishD \
--to=zsh@dervishd.net \
--cc=wayned@users.sourceforge.net \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).