Re: Wrong variable expansion inside quotation marks

2008-02-13 Thread Chet Ramey
Reuti wrote: Hi, I have one system with: [EMAIL PROTECTED]:~> bash --version GNU bash, version 3.00.16(1)-release (i586-suse-linux) Copyright (C) 2004 Free Software Foundation, Inc. [EMAIL PROTECTED]:~> hallo=hallo [EMAIL PROTECTED]:~> rr=r [EMAIL PROTECTED]:~> tt="${rr:0:${#rr}-1}$hallo" [EMA

Re: broken pipe

2008-02-13 Thread Paul Jarc
"Brian J. Murrell" <[EMAIL PROTECTED]> wrote: > It is a shame for this particular reason that head does not (perhaps as > an option) consume it's input after displaying the 20 lines. You can do that with sed: ... | sed '21,$d' paul

Re: broken pipe

2008-02-13 Thread Brian J. Murrell
On Wed, 2008-02-13 at 16:00 -0500, Brian J. Murrell wrote: > > find / -type f -print 2>&1 | head -20 || true Doh! This of course won't work. The first solution should though. b. signature.asc Description: This is a digitally signed message part

Re: broken pipe

2008-02-13 Thread Brian J. Murrell
On Wed, 2008-02-13 at 14:56 -0600, Michael Potter wrote: > Bash Bunch, > > I googled a bit and it see this problem asked several times, but I > never really saw a slick solution: > > given this: > > set -o pipefail > find / -type f -print 2>&1 |head -20 > echo ${PIPESTATUS[*]} > > prints this:

broken pipe

2008-02-13 Thread Michael Potter
Bash Bunch, I googled a bit and it see this problem asked several times, but I never really saw a slick solution: given this: set -o pipefail find / -type f -print 2>&1 |head -20 echo ${PIPESTATUS[*]} prints this: 141 0 find fails because it has a bunch of output, but head only will accept the

Wrong variable expansion inside quotation marks

2008-02-13 Thread Reuti
Hi, I have one system with: [EMAIL PROTECTED]:~> bash --version GNU bash, version 3.00.16(1)-release (i586-suse-linux) Copyright (C) 2004 Free Software Foundation, Inc. [EMAIL PROTECTED]:~> hallo=hallo [EMAIL PROTECTED]:~> rr=r [EMAIL PROTECTED]:~> tt="${rr:0:${#rr}-1}$hallo" [EMAIL PROTECTED]: