* problems trying to redirect output from a command
@ 2000-06-29 14:33 Charlton, Mark
0 siblings, 0 replies; only message in thread
From: Charlton, Mark @ 2000-06-29 14:33 UTC (permalink / raw)
To: tru64-unix-managers
Hi,
I'm trying to write a script to startup TNG on an alphaserver.
The script needs to check that a command has run correctly. To do this I
want to grep the output.
The command if it runs correctly should appear as below
# enfcontrol 847
enfcontrol 847
Enfcontrol[847]: CA tapes will NOT be protected after Tape shutdown
To check it has run correctly I only need to grep for NOT. If it fails,
another message is displayed.
The problem is that if I redirect the output only the first line appears in
the redirected file. I think, but am not sure that the command interacts
with some other TNG stuff, and this causes the second line of text to be
sent directly to the shell/terminal, and NOT to standard output. Therefore
you can't redirect the data as standard output.
I've tried playing around with redirecting standard output, error, tee,
piping - all to no avail. I've tried using the script utility, which
actually works interactively, but actually requires a 'streams based
terminal' as stated in the man pages, and so doesn't work within a script.
Does anyone have any ideas, that's if what I've just posted makes any sense
to anyone?
many thanks
Mark
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-29 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-29 14:33 problems trying to redirect output from a command Charlton, Mark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox