MLUG: [MLUG] the Linux command "script"
[MLUG] the Linux command "script"
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
This is an interesting command. I was making a little script of my own for temporary use and I named it "script." Then I made the mistake of entering this command...

script

...instead of this command:

./script

A single line appeared telling me "Script started, file is typescript." I realized my mistake, entered the "./script" command and continued on my merry way. A little later I found out that my command history was lost. That was a little disturbing, but I thought it might have to do with my accidentally running the command "script." So I took a look at this:

man script

It isn't exactly clear from the documentation that script starts a new shell. So that's why I didn't have my command history. I hit Ctrl-D and that stopped 'script' and returned me to my shell and command history.

Then I looked at the file 'typescript' (the file script had made) and sure enough, it contained everything I had seen on the screen. It's best to view it this way because of the control characters:

less -r typescript

Mike

--
Michael B. Miller, Ph.D.
Assistant Professor
Division of Epidemiology and Community Health
and Institute of Human Genetics
University of Minnesota
http://taxa.epi.umn.edu/~mbmiller/
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members