From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from techfac.techfak.uni-bielefeld.de ([129.70.1.2]) by archone.tamu.edu with SMTP id <22533>; Thu, 29 Aug 1991 05:01:19 -0500 Received: from dahlie.TechFak.Uni-Bielefeld.DE by techfac.techfak.uni-bielefeld.de (5.65+bind 1.7+ida 1.4.2/tp.29.0890) id AA03900; Thu, 29 Aug 91 12:01:03 +0200 Received: by dahlie.techfak.uni-bielefeld.de (4.1/tp.29.0890) id AA06533; Wed, 28 Aug 91 21:28:26 +0200 Date: Wed, 28 Aug 1991 14:28:26 -0500 From: malte@techfak.uni-bielefeld.de Message-Id: <9108281928.AA06533@dahlie.techfak.uni-bielefeld.de> To: rc@archone.tamu.edu Subject: hopefully last letter on sh Mea culpa, John is right with what he says about terminal \n handling in sh. The file including the sample is kind of a binary, so therefore it hasn't got a terminal \n. But I disagree on your "cat" example. This only prooves that you cannot decide whether perror(3) on pathnames or sh inside "" strips trailing \ns. Having read John's letter I tried this (^X is char 030): echo "hello ^X there" > test od -c tescht which gives "h e l l o 030 t h e r e \n" echo -n "`cat test`" | od -c responding with "h e l l o 030 t h e r e" Anyway, the result is the same, I just had to have those control chars kept. And now the final answer for today, which is: prg -sample `` () { cat file } This really works! To come to an end: I know that my expamples were silly, but there were people seriously suggesting this, and I wanted to prevent answers of this kind. And insulting will probably not have been the right word, I meant something weaker. Sigh, English is not my native language. Malte