[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Script Utility Fails

Posted on 2004-10-14
4
Medium Priority
?
299 Views
Last Modified: 2013-12-27
Hello,

I am trying to run the 'script' utility in SunOS 5.8 to make a capture of a sequence of commands that I am performing.

I type:

> script test.txt
Script started, file is test.txt
No such file or directory
Script done, file is test.txt

And it just immediately quits the script program.  I checked the man page for the script utility, and it says that it forks and creates a sub-shell based on the value of $SHELL.  So, I checked did an "echo $SHELL" and it came out blank.  Strange.  So I run a "set SHELL=/usr/bin/tcsh".  But I still get the same results when I run the script utility.

By the way, I tried both /usr/bin/script and /usr/ucb/script, and both yield the same results.

Please help! =)
0
Comment
Question by:jshantz4
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 12306914
0
 
LVL 4

Accepted Solution

by:
Otetelisanu earned 1500 total points
ID: 12306967
script test.txt /tmp/test.log

make ls -l

after cat /tmp/test.log

0
 

Author Comment

by:jshantz4
ID: 12307039
Thanks for your response.

That PDF does not load properly.  I just see blank pages.

Anyhow, I tried your suggestion.  It still gives me the same error:

> script test.txt /tmp/test.log
Scripted started, file is test.txt
No such file or directory
Script done, file is test.txt
>

What is the purpose of adding /tmp/test.log ?   The man page for the script utility only allows you to specify the name of the file to which you wish to record your session.  Why are you specifying two files on the command line (i.e. test.txt AND /tmp/test.log) ?

SYNOPSIS
     script [ -a ]  [ filename ]


Thank you.
0
 

Author Comment

by:jshantz4
ID: 12308722
I actually fixed this one myself:

I deleted my .cshrc file, and created a new one with default settings.  The script utility now works.  Thanks for your suggestions.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question