Solved

Script Utility Fails

Posted on 2004-10-14
4
291 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

809 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