script -q not working in Solaris5.10


 
Thread Tools Search this Thread
Operating Systems Solaris script -q not working in Solaris5.10
# 1  
Old 05-12-2011
Error script -q not working in Solaris5.10

Hi

I am using 'script' command in .login of users to record their sessions but it is displaying the messages like:

Code:
Script started, file is typescript

and
Code:
Script done, file is typescript

But I do not want these messages to be printed to user.

I tried script -q for silent run to disable displaying messages but it says -q switch is not supported.

Is there a fix for -q, a patch or something?? Or any other workaround. Smilie Smilie

Code:
test@GGNAP25 {13} uname -a
GGNAP25 GGNAP25 5.10 Generic_137111-01 sun4u sparc SUNW,Sun-Fire-V240

BR//
# 2  
Old 05-12-2011
There is not much you can do with the script command. The only switch supported (-a) opens the script file in append mode.

script prints the message to stdout, so you could redirect stdout to /dev/null
Code:
script >/dev/null

but then, there would be no output to the screen while script is running.

The best bet would be to download the source of the script utility from Cross Reference: /onnv/onnv-gate/usr/src/cmd/script/script.c (it's just a single source file), remove the offending printf-statements ("script started ...", "script ended ...") and compile it yourself to a command, say 'quietscript' and use this instead of script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with speeding up my working script to take less time - how to use more CPU usage for a script

Hello experts, we have input files with 700K lines each (one generated for every hour). and we need to convert them as below and move them to another directory once. Sample INPUT:- # cat test1 1559205600000,8474,NormalizedPortInfo,PctDiscards,0.0,Interface,BG-CTA-AX1.test.com,Vl111... (7 Replies)
Discussion started by: prvnrk
7 Replies

2. UNIX for Dummies Questions & Answers

My script is not working

Hi All, I am trying to calculate the total_amount based on two key fields. Here is the script. I am new to unix. So please help me to find out the error in this script. I'm getting error like "command not found" and ]; is missing.. PRE_LBNO=0 PRE_DATE=0 TOT_PAY=0 for line in `cat... (4 Replies)
Discussion started by: lathanandhini
4 Replies

3. Solaris

While copying files from windows to Solaris5.8 with filezilla length of the filename changed

Hello I am copying a tar from windows7 to Solaris with filezilla i could see, some characters in the name of the file get deleted. I could see only substring of the filename eg: original filename :abcdefghijklmnopqrstu.h i can see like abcdefghijklm solution to this problem is highly... (2 Replies)
Discussion started by: Revathi R
2 Replies

4. Shell Programming and Scripting

expect script inside shell script not working.

Shell Scipt: temp.sh su - <$username> expect pass.exp Expect script: pass.exp #!/usr/bin/expect -f # Login ####################### expect "Password: " send "<$password>\r" it comes up with Password: but doesnt take password passed throguh file. (2 Replies)
Discussion started by: bhavesh.sapra
2 Replies

5. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies

6. Shell Programming and Scripting

Script is not working from cron while working manually

Hello, I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me 1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

7. Solaris

login issue in solaris5.6

Hi, I have reset the account on solaris 5.6. After resetting, User unable to login and putty gets closed once enter the password. Please suggest ASAP..... Thanks in Advance (6 Replies)
Discussion started by: bpsunadm
6 Replies

8. Shell Programming and Scripting

Perl script 'system' linking to local shell script not working

Trying to figure out why this works: printpwd.pl #!/usr/bin/perl use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; $A = system("pwd"); $A = `pwd`; print "$A\n"; ^^actually that works/breaks if that makes any sense.. i get the working directory twice but when... (5 Replies)
Discussion started by: phpfreak
5 Replies

9. Shell Programming and Scripting

Script not working..."sort" not working properly....

Hello all, I have a file - 12.txt cat 12.txt =============================================== Number of executions = 2 Total execution time (sec.ms) = 0.009883 Number of executions = 8 Total execution time (sec.ms) = 0.001270 Number of... (23 Replies)
Discussion started by: Rahulpict
23 Replies

10. Shell Programming and Scripting

Script not working.

Hi, I am a DBA, worked on Windows platforms for past 6 years, and now shifted in environment where HP UX is OS environment. I have task to complete which involves Unix script to be prepared. This script should FTP the file to the destination server and if this FTP fails, then it should... (5 Replies)
Discussion started by: Nishchal_Nagre
5 Replies
Login or Register to Ask a Question