From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96228923332344.tru64-unix-managers.marc@archive.invalid> From: "Charlton, Mark" Date: Thu, 29 Jun 2000 14:33:11 +0000 To: tru64-unix-managers Subject: problems trying to redirect output from a command X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96228923332344 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