Pesky here-document warnings

2010-11-16 Thread Mun
Hi,

I often get the following e-mailed to my by my system with the subject
of "Output from your job ":

-- Delimiter BEGIN 

sh: line 497: warning: here-document at line 494 delimited by end-of-file 
(wanted ``(dd if=/dev/urandom count=200 bs=1 2>/dev/null|LC_ALL=C tr -d -c 
[:alnum:])`')

--- Delimiter END -

I have no idea which job could be producing this error?  Does it look
familiar to anyone?  Any ideas on how I can track down the culprit?

Regards,

-- 
Mun



Re: Pesky here-document warnings

2010-11-16 Thread Chet Ramey
> Hi,
> 
> I often get the following e-mailed to my by my system with the subject
> of "Output from your job ":
> 
> -- Delimiter BEGIN 
> 
> 
> sh: line 497: warning: here-document at line 494 delimited by end-of-file 
> (wanted ``(dd if=/dev/urandom count=200 bs=1 2>/dev/null|LC_ALL=C tr -d -c 
> [:alnum:])`')
> 
> --- Delimiter END 
> -
> 
> I have no idea which job could be producing this error?  Does it look
> familiar to anyone?  Any ideas on how I can track down the culprit?

The shell thinks you have an unterminated here document.  Have you looked at
like 494 of the script producing this error message?

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: Pesky here-document warnings

2010-11-16 Thread Greg Wooledge
On Tue, Nov 16, 2010 at 01:13:48PM -0800, Mun wrote:
> I often get the following e-mailed to my by my system with the subject
> of "Output from your job ":

In other words, an at(1) job.

> sh: line 497: warning: here-document at line 494 delimited by end-of-file 
> (wanted ``(dd if=/dev/urandom count=200 bs=1 2>/dev/null|LC_ALL=C tr -d -c 
> [:alnum:])`')

sh, and not bash?  That could be the primary culprit.

It looks like you attempted to run code like this, in an at(1) job:

  something < <(dd if=...)

Only, one of two things prevented it from working as expected:

 1) You screwed up and wrote <<(dd if=...) instead of < <(dd if=...)
 2) You ran it under sh instead of bash.  E.g. by passing it directly
to at(1) on a system where at(1) uses sh for its commands.

> I have no idea which job could be producing this error?  Does it look
> familiar to anyone?  Any ideas on how I can track down the culprit?

Um... they're your at(1) jobs, not ours.  I doubt anyone else has those
same jobs queued.



Re: Pesky here-document warnings

2010-11-16 Thread Mun
Hi Chet, Greg,

Thanks for your replies.

On Tue, Nov 16, 2010 at 01:22 PM PST, Chet Ramey wrote:
CR> > Hi,
CR> > 
CR> > I often get the following e-mailed to my by my system with the subject
CR> > of "Output from your job ":
CR> > 
CR> > -- Delimiter BEGIN 

CR> > 
CR> > sh: line 497: warning: here-document at line 494 delimited by end-of-file 
(wanted ``(dd if=/dev/urandom count=200 bs=1 2>/dev/null|LC_ALL=C tr -d -c 
[:alnum:])`')
CR> > 
CR> > --- Delimiter END 
-
CR> > 
CR> > I have no idea which job could be producing this error?  Does it look
CR> > familiar to anyone?  Any ideas on how I can track down the culprit?
CR> 
CR> The shell thinks you have an unterminated here document.  Have you looked at
CR> like 494 of the script producing this error message?

That's just it, I don't have any cron scripts that use here-documents.
Most of my cron jobs are fairly trivial scripts less than 100 lines long.

I'm running on a Red Hat Enterprise Linux 5.5 system, and my guess is
that the system is running something on my behalf.  But I don't know
what.

At first I was able to ignore the messages because I could not detect
any anomalies.  But now I've reached my threshold where the messages
(sometimes up to about ten in a day) are starting to annoy me.

Thanks again for the replies.

Regards,

-- 
Mun