System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide name of file created by 'script'

Richard Heasman
Occasional Visitor

How to hide name of file created by 'script'

Hi all,

When a terminal session is transcribed using the 'script' command, the name of the file is displayed at the beginning and the end of the session, e.g. :
"Script started, file is /tmp/session.log"
Does anybody know how to redirect these so that the session is logged silently, i.e. the log name is hidden?

All replies gratefully received.

Rich
3 REPLIES
Huc_1
Honored Contributor

Re: How to hide name of file created by 'script'

I dont have a True64 to check this on but on a Linux the command is

script -q /tmp/test_script
|
|
|
type you command
|
|
to end ^d

the -q is for quite is suppose this is the same in True64 have a try and/or have a look at man script.

If it does not work tell me I will have a look on True64 this evening.

J-P
Smile I will feel the difference
Richard Heasman
Occasional Visitor

Re: How to hide name of file created by 'script'

Hi J-P,

I tried this on Tru64 and it didn't work - it appears you can only use:
usage: script [ -a ] [ file ]
That's why I've been experimenting with redirecting STDOUT and STDERR

But thanks anyway.
Note, I've also got to make this work on AIX and Solaris. (Not Linus unfortuantely!!)


Rich
Sunil Sharma_1
Honored Contributor

Re: How to hide name of file created by 'script'

Hi,

script -q work fine under Red Hat 8

for True64 i am not sure.....
Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***