Hi all,

Here's a quick one...

The following works as expected:

# exec 9<>test.file ; jot 50 >&9 ; tail  -5 <&9 9>&-
46
47
48
49
50

The next one does not:

# exec 9<>test.file ; jot 50 >&9 ; head  -5 <&9 9>&-
#

The question is: Why?

bash --version
GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
Copyright (C) 2005 Free Software Foundation, Inc.

I'd like to "split" output from a pipe to perform multiple end-steps
after a long-chain of pipes. FD redirection seems to be the best way.

Many thanks in advance for any ideas as to why "head" doesn't work and
"tail" does.

Thanks

SM

Reply via email to