From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6816 invoked by alias); 1 Nov 2014 21:11:48 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19305 Received: (qmail 11574 invoked from network); 1 Nov 2014 21:11:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [80.3.229.105] X-Spam: 0 X-Authority: v=2.1 cv=RdIeCjdv c=1 sm=1 tr=0 a=uz1KDxDNIq33yePw376BBA==:117 a=uz1KDxDNIq33yePw376BBA==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=TbnDrfumkoF8AxH8AQ8A:9 a=CjuIK1q_8ugA:10 Date: Sat, 1 Nov 2014 21:11:26 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: first adventures Message-ID: <20141101211126.4c26682c@pws-pc.ntlworld.com> In-Reply-To: <54554194.80109@eastlink.ca> References: <544D2D6F.8030505@eastlink.ca> <20141026175257.2611487b@pws-pc.ntlworld.com> <544FD6DD.7010806@eastlink.ca> <141028210510.ZM10784@torch.brasslantern.com> <54510A96.20009@eastlink.ca> <141029134624.ZM15681@torch.brasslantern.com> <545178DF.1040600@eastlink.ca> <141029210738.ZM15833@torch.brasslantern.com> <5452ED18.7070208@eastlink.ca> <141030195906.ZM30057@torch.brasslantern.com> <5453D0AE.6020705@eastlink.ca> <20141031195903.167d3e05@pws-pc.ntlworld.com> <545460D9.2090804@eastlink.ca> <54550BE5.6080602@eastlink.ca> <20141101184028.0737142d@pws-pc.ntlworld.com> <54554194.80109@eastlink.ca> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 01 Nov 2014 13:24:52 -0700 Ray Andrews wrote: > > If you want text not to be processed by the shell, the best way of doing > > that is to pass it via standard input and output rather than the command > > line, using "read -r" and "print -r". > > Can you give me an example of that, please? It doesn't really fit in the case you're looking at. The point was more that if you had the choice, which you don't, and you had to pass raw chunks of text around you'd do things like read -r line < input print -r -- $line > output and not actually worry about what was in $line at all. Perhapse the real point is what you're looking at is an unusual case in that you've been passed a piece of raw shell input and you're thinking about what it would look like if it wasn't raw any more. This is hairy stuff that most people who consider themselves shell language gurus probably never have to think about --- extracting bits of semi-parsed chunks of input is something most people would do in a language like Lisp rather than a shell. So it's not surprising you're a bit bamboozled when you're coming to this out of nowhere. pws