From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <4730CF32.8070704@mail.maht0x0r.net> References: <4730CF32.8070704@mail.maht0x0r.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: arisawa@ar.aichi-u.ac.jp Subject: Re: [9fans] late to the party - Here docs Date: Wed, 7 Nov 2007 06:54:32 +0900 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: ecb8bfb0-ead2-11e9-9d60-3106f5b1d025 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 > > > > > > > > >