My original message was:
"Hi managers!
> I'm still waiting on some replies on my last message (inittab
> question), but in the mean time I have another question. We get an
> error message that says "SIGNAL: Broken pipe (ut12)" in a script file
> when the line "DATE=`date | sed 's/ / /'`" runs. It doesn't happen
> every time and doesn't happen for every user. What does this message
> mean, why is this simple command causing it, and what do I do about
> it?
>
> Thanks!
>
> Stephen Spalding
> Associate System Administrator
> Missouri Employers Mutual Insurance
> sspaldin_at_mem-ins.com
> 1000 West Nifong
> Columbia, MO 65203
> (573) 499-4230
> (800) 442-0590
> fax (573) 499 - 4310"
>
>
It turns out that the problem had to do with an input file that was
being read was too big. Well, I'm not 100% positive that was the exact
problem, but we did find that once we reduced the size of the input
file, the problem went away. I'm not going to research this one a whole
lot further since the problem is fixed for now. Thanks to everyone who
replied! Here's a few suggestions from those who replied:
> Consider the two processes READER and WRITER. WRITER writes to a
> pipe
> and READER reads from the pipe. If WRITER closes the pipe, READER
> will
> get EOF after the last byte of data. If READER closes the pipe,
> data
> already written to the pipe are lost (there are no one to read
> it) and
> WRITER gets SIGPIPE.
>
> I cant tell you why the line fails with sigpipe. Can all users
> find
> the 'sed' command ?
>
>
> Lars Bro
>
>
>
>
>
I have no clue why you get a broken pipe, but you can solve the problem
by
not using pipes ;-)
use somepthing like: DATE=`date +"%Y%m%d.%H:%M:%s"`
man date gives the exact things you need to format a date..
Hope this helps
Christophe Colle
I had a similar problem...
This may happen, when the program producing the output is terminating
too fast.
Try to encapsulate the date in an "echo". BTW the variable is set -
isn't it ? So the error message can be ignored.
Greetings,
Stefan Albert
Depending on the type of system you are using I tried your command
and with or without the sed command there is no difference. So take it
out
and see what happens. I am on a Dec/Unix system.
Alethia Dunn
Jr. Systems Analyst
Naval Surface Warfare Center
- application/ms-tnef attachment: stored
Received on Thu Apr 30 1998 - 16:26:45 NZST