On Wed, 9 Dec 1998, Scott McDermott wrote:
So sorry, but I got both,
aix 4.1 with BASH2.0
and
redhat 5.1 with kernel 2.0.35 and afs
and with both of them I can do
jobs | grep pattern
without any problem.
by the Way... it is usualy a good idea to use
#!/bin/sh
as the first line (not bash) and relay to just the bourn-shell syntax
since this is the shell (or syntax-subset) which comes per default with
als systems I know. This way You are more Instalation- and
System-independend
By the other Way .....
on AIX 4.1 I can see this :
/usr/bin/jobs
which is a shellskript. Have a closer look,
it seams to be a workaround for the kornshell ?!
> Under AIX, stdout from the bash builtin `jobs' can be piped arbitrarily
> (to a pager, to grep, what have you). Under Linux, it seems that I
> can't do this; the pipe comes up empty. I can:
>
> jobs >thisfile; grep pattern thisfile
>
> but I cannot:
>
> jobs | grep pattern
>
> although either works under AIX. The shell is the same for both
> environments. I have invoked them with --noprofile and --norc in order
> to rule out some kind of setting which makes the pipes behave
> differently.
>
> Does anyone know why bash behaves differently under AIX? And why I can't
> do this with Linux? (2.0.36, egcs-1.0.3a, glibc-2.0.6, bash-2.02.1). I
> really would like to be able to parse this output for a script I'm
> trying to write. I'm also immensely curious why the behavior would
> differ...
>
> --
> Scott
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hochachtungsvoll und mit freundlichen Gruessen aus dem Dungeon :
MATHIAS
____/ ___/ / / ___/ __
xxxxx / / / / / / \ _\||/_
X __ \ / / / / / / } o o
X C O-O __/ __/ / / __/ _ ___/ (_)
X _\ / / / / / / \ ===
X _@ / / / / / / \
| | __/ _____/ __/ _____/ _____/ __/ \__
Mathias Feiler Am Ried 6 88637 Illmensee 0049 (0)7558/94388 (Privat)
[EMAIL PROTECTED] RZ (620) 0049 (0)711/459-3949 (Uni)
PGP public key & Homepage : http://www.uni-hohenheim.de/~feiler
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -