Solved

Script Utility Fails

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ovirt 3.6 guest VM support oracle solaris 4 86
phantom space used up on RHEL?  (du shows no space used) 1 85
Virtualizing TAPE on dual VIOS 3 115
Image not there 4 63
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 promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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.:
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.

679 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