Solved

Script Utility Fails

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now