[WBEL-users] bash causes sporadic job control output

Alan Sparks asparks@quris.com
Tue, 20 Jul 2004 13:55:51 -0600


Andy Rabagliati wrote:
> On Tue, 20 Jul 2004, Alan Sparks wrote:
> 
> 
>>====== the script for reference =====
>>#!/bin/sh
>>/opt/sendmail/mailq \
>>        | perl -n -e '/^\s+\<.*\@(.*)\>/ && print "$1\n"' \
>>        | sort \
>>        | uniq -c \
>>        | sort -nr
> 
> 
> No lurking spaces after those backslashes ?

Nope.  Been there, done that...

> Try sticking it all on one line ?

Nope, been there, done that... :-)

> md5sum the scripts on the different boxes just to make sure ?

Script is identical.  No strange bits.
Apparently the problem is bash's reaction to SIGPIPE.  Bash is reporting 
a 'broken pipe' on the last command in the script pipeline, caused by 
the "head" I pipe the script output into (viz: "mtabacklog | head").

So far I've been trying to understand why it's so different between WBEL 
(and I suppose it'd be the same on RHEL) and everything else (like older 
RH releases and on Fedora).

-- 
Alan Sparks, Sr. UNIX Administrator	asparks@quris.com
Quris, Inc.				(720) 836-2058