Operating System - HP-UX
1834445 Members
2063 Online
110067 Solutions
New Discussion

Re: Quite mode for hp unix script command

 
James Wang_3
Occasional Advisor

Quite mode for hp unix script command

Hi, I would like a question for unix guru. I need to achieve an automation which calls script command. The execution will generate a prompt as follows:
root@alpha:/home/jwang3> script
Script started, file is typescript

Is there anyway I can suppress this line of prompt? I know in Linux you can achieve with
script -q.

Where I can download the source file to delete this prompt and re-compile it. Can I use some existing binary file to achieve this or just simply take another unix flavor version of script to run?

Thank you in advance.
7 REPLIES 7
Vitek Pepas
Valued Contributor

Re: Quite mode for hp unix script command

Try this:
script >/dev/null 2>&1
Vitek Pepas
Valued Contributor

Re: Quite mode for hp unix script command

NO!!! Don't try it!!!
Sorry.
Patrick Wallek
Honored Contributor

Re: Quite mode for hp unix script command

1) I know of no way to suppress this in HP-UX. The only option available in HP-UX is '-a filename' to make the output go to a file other than typescript.

2) I doubt that you'll be able to download the source for this as HP is *VERY UNLIKELY* to release this.

3) A version of the script command from another version will not work. Executables are almost never compatible between different flavors of unix.

James Wang_3
Occasional Advisor

Re: Quite mode for hp unix script command

For using script -a filename will not make you get back the shell prompt. We need continue to type in. Thanks.
Patrick Wallek
Honored Contributor

Re: Quite mode for hp unix script command

Huh? I don't understand.

If you do:

$ script -a file

You will get the prompt back! The only reason I can think of that you might not get the prompt back is if you are trying to write to an NFS mounted filesystem and you are having NFS trouble. Otherwise you should get the prompt back and be able to do whatever you need to do.

script will record everything you do until you type 'exit' and exit the script sub-shell.
Elmar P. Kolkman
Honored Contributor

Re: Quite mode for hp unix script command

The -a option only indicates it should append, not overwrite...

But I guess you could search the linux or BSD sources for the source of script. I see no reason it should not work on HP-UX.
Every problem has at least one solution. Only some solutions are harder to find.
James Wang_3
Occasional Advisor

Re: Quite mode for hp unix script command

Elgar,

I tried to search but got no luck. Is there any link or location you can recommend? Thanks for the help.