9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa@ar.aichi-u.ac.jp
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] late to the party - Here docs
Date: Wed,  7 Nov 2007 06:54:32 +0900	[thread overview]
Message-ID: <E3E4C96A-9344-4BC2-8BAA-4E6CDC5D3A9D@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <4730CF32.8070704@mail.maht0x0r.net>

Hello,

Try:

cat > lib/profile <<'!'

bind -a $$home/bin/rc /bin
!

Kenji Arisawa

On 2007/11/07, at 5:31, maht-9fans@mail.maht0x0r.net wrote:

> hi,
>
> I've not been able to post for a while (verifying sender didn't  
> like me), so I've got a few things stored up
>
> I think it was eric that said the only place here docs are used in  
> plan9 default is in /sys/lib/newuser and there whoever wrote it  
> went through some shenanigans to get $ in the output  (though this  
> is snipped):
>
> x='$'
> cat > lib/profile <<!
> bind -a $x^home/bin/rc /bin
> !
>
> However, what that person seems not to know is that they could have  
> done $$ to escape the $ :
>
> cat > lib/profile <<!
>
> bind -a $$home/bin/rc /bin
> !
>
> I like here documents, I think they look better than multi-line  
> echoes though it is annoying they can't be used in fn definitions.
>
> Matt
>
>
>
>
>
>
>
>
>


      parent reply	other threads:[~2007-11-06 21:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06 20:31 maht-9fans
2007-11-06 21:07 ` erik quanstrom
2007-11-07 16:41   ` dave.l
2007-11-07 20:19     ` erik quanstrom
2007-11-07 21:20       ` geoff
2007-11-07 21:23         ` erik quanstrom
2007-11-07 22:58       ` Martin Neubauer
2007-11-07 23:04         ` erik quanstrom
2007-11-07 23:24           ` Martin Neubauer
2007-11-08  0:37       ` dave.l
2007-11-08  1:21         ` Gregory Pavelcak
2007-11-06 21:54 ` arisawa [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=E3E4C96A-9344-4BC2-8BAA-4E6CDC5D3A9D@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@cse.psu.edu \
    /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.
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).