From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <72b594bfc91b8b53b4d2793a941fed5c@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] rc here docs From: rog@vitanuova.com In-Reply-To: <69f5b2e51adfc734027e4cf14ffa8286@collyer.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 9 Sep 2003 18:12:00 +0100 Topicbox-Message-UUID: 30182478-eacc-11e9-9e20-41e7f4b1d025 the main advantage of here documents as far as i can see is a syntactic one; it's nicer to see: cat << EOF don't care about ' marks. $home is where the heart is. EOF than its near-equivalent: echo 'don't care about '' marks. '^$"home^' is where the heart is.' | cat particularly when you've got lots of text as a template. balancing single quotes is very easy to get wrong. i do sometime regret the lack of here documents in the inferno shell for that reason (although actually putting them into /tmp seems a little archaic) i wonder if there might be room for a "here word" i.e. something that is equivalent to a word, but looks syntactically something like a here document. dunno what the syntax would look like though.