redirecting the terminal to file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting redirecting the terminal to file
# 1  
Old 05-05-2011
redirecting the terminal to file

Hi,

I want to save the whole Output of the terminal in a file. I dont want to redirect a single command to a file (ls -l > test.txt), I want to redirect the whole last 40 lines into a file.

Maybe i can read out the terminal while working with it, but i cant find a way to save the whole output into a file.

Maybe you can help me...

sincerely,
niratschi
# 2  
Old 05-05-2011
read man page on script command. I guess you looking for that.
# 3  
Old 05-05-2011
Thx, this is what i was looking for.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirecting terminal to variable

when i do something like this: bona=$(echo hi2 > /dev/pts/1 ; printf '%s\n' "" | sed '/^$/d') i get: hi2 and the $bona variable is empty, when I run: echo ${bona} i get the result "hi2" outside of the variable. I want it stored in the bona variable with nothing outputted to the... (6 Replies)
Discussion started by: SkySmart
6 Replies

2. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

3. Shell Programming and Scripting

Redirecting script output to terminal

When ever i started my terminal,Every time I have to change the directory like "cd user/documents/ravi/folder2/folder3" Without typing this entire command every time ,I placed "alias c='cd user/documents/ravi/folder2/folder3'" in .bash_profile file. so that i can able to execute command 'c'... (6 Replies)
Discussion started by: Raviteja saddal
6 Replies

4. Shell Programming and Scripting

Redirecting STDERR to file and screen, STDOUT only to file

I have to redirect STDERR messages both to screen and also capture the same in a file but STDOUT only to the same file. I have searched in this formum for a solution, but something like srcipt 3>&1 >&2 2>&3 3>&- | tee errs doesn't work for me... Has anyone an idea??? (18 Replies)
Discussion started by: thuranga
18 Replies

5. Slackware

X terminal: Redirecting remote sound to my local audio device

Hello everybody, I'm testing some aspects of X Terminal implementation and it's going great. I can use remote applications on my local slow workstation at remote's processor speed by redirecting the remote DISPLAY variable to "my_local_ip:0.0"; but i'm having troubles to get remote audio and... (2 Replies)
Discussion started by: semash!
2 Replies

6. Shell Programming and Scripting

extracting line numbers from a file and redirecting them to another file

i have applied the following command on a file named unix.txt that contains the string "linux from the text" grep -n -i -w "linux from the text" unix.txt and the result is 5:Today's Linux from the text systems are split into various branches, developed over time by AT&T as well as various... (5 Replies)
Discussion started by: arindamlive
5 Replies

7. Shell Programming and Scripting

Reading UNIX commands from file and redirecting output to a file

Hi All I have written the following script: #!/bin/ksh while read cmdline do echo `$cmdline` pid="$cmdline" done<commands.txt =========== commands.txt contains: ps -ef | grep abc | grep xyz |awk '{print $2}; My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies

8. Programming

Redirecting Terminal to Local Application!

i wanted to execute some terminal commands on local linux, parse their output and display it to the user, i checked netcat source code but i couldnt understance it since im new to c (and linux at the same time). so i was wondering if there is away to run an instance of terminal hidden, read and... (15 Replies)
Discussion started by: JonhyM
15 Replies

9. Shell Programming and Scripting

redirecting a file

Hi, I have a normal txt file which contains say 5 lines. in that i need to change few of the the parameters dynamically. for eg.. line 1..contains account line 2 contains date line 3 contains user .. .. .. i will be taking the input using read command and store it in variables... (3 Replies)
Discussion started by: wip_vasikaran
3 Replies

10. UNIX for Dummies Questions & Answers

redirecting one terminal into an other??

Hi guys; I want to show what am I doing on a terminal into another. I did something close but its not working really good. Example: cat /dev/pts/12 >/dev/pts/13 where 12 is my terminal and 13 its the other terminal. This is usefull for me to share my small unix knowledge to other people... (4 Replies)
Discussion started by: piltrafa
4 Replies
Login or Register to Ask a Question