tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Charlton, Mark" <Mark.Charlton () capgemini ! co ! uk>
To: tru64-unix-managers
Subject: problems trying to redirect output from a command
Date: Thu, 29 Jun 2000 14:33:11 +0000	[thread overview]
Message-ID: <96228923332344.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~2000-06-29 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox