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
"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
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
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:
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
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]: