The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 07-31-2008
satimis satimis is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 45
Quote:
Originally Posted by era View Post
Yeah, something like echo ls -l | sh -ix and if it looks like you want it, add the tee

To my amazement, I found that at least bash in sh mode works pretty well interactively even with the redirection to tee. Maybe you don't have to put your commands in a file after all.
Hi era,


Noted with thanks.


script command solves my problem.

$ script /path/to/output.txt

$ run other commands

$ exit
save all output including commands on the file.

$ script -a /path/to/output.txt
resume script and continue adding output on the file.


Thanks


B.R.
satimis