Output to terminal and file at the same time


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Output to terminal and file at the same time
# 1  
Old 11-15-2001
Question Output to terminal and file at the same time

Hi all
The makefile of a large project produces hundreds of lines of output, which I can't look at any more when the build is finished. If I simply redirect the output to a file, I can't see the progress of the building process...

Is there a possibility to redirect the output to a file and at the same time still get the output on the terminal.

Cheers
Charlie
# 2  
Old 11-15-2001
I like to use "tail" to handle this kind of situation. Something like this:
make > make.out 2>&1
tail -f make.out
then I can interrupt and restart the tail anytime I want.

A second option is the "tee" command.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Printing Terminal Output to a Error File

I am having a bash script which is basically invoking a python program to validate the Source Query results against the target query results. I am placing all the queries in a .sql file. I want to write to a Error log file incase if the syntax is wrong or if the column is not present in the... (4 Replies)
Discussion started by: ronitreddy
4 Replies

3. UNIX for Dummies Questions & Answers

Strange behaviour when output to terminal vs file (awk)

Hi all ! I noticed something very weird. I have a large pipe delimited file (20 fields/3,000 records) that looks like that: AAA|BBB|11111|22222|...|($NF of record 1) CCC|DDD|33333|44444|...|($NF of record 2) CCC|DDD|55555|66666|...|($NF of record 3) For the lines with same 1st and 2nd... (3 Replies)
Discussion started by: beca123456
3 Replies

4. Shell Programming and Scripting

how to Redirect the output of telnet command on a terminal to a file ?

(/home/user1)-> more script.sh #!/bin/ksh ( echo open devicename sleep 3; echo user; sleep 2; echo password; sleep 2; echo "/info/dump"; ---------> This needs to redirect to a file .Can be number of pages sleep 2; echo "exit" ) | telnet Please use code tags next time for... (2 Replies)
Discussion started by: necro98
2 Replies

5. UNIX for Dummies Questions & Answers

Live/real-time text-file updates in terminal

I want to have a terminal open and have something like a "repeating cat" command running in it for a certain text file (in particular /var/log/system.log). So my terminal will scan or cat the text file every so often or whenever the text file system.log gets written to by the system, it will... (1 Reply)
Discussion started by: guitarscn
1 Replies

6. AIX

All output at console and in a file at same time ?

I have several backup scripts I am improving which involves mksysb, savevg and tar. Is there a way to have the output of any command sent to the standard output as usual (terminal) and at the same time, send a copy of it all into a file ? Normal outputs and error outputs. Even if I am... (1 Reply)
Discussion started by: Browser_ice
1 Replies

7. UNIX Desktop Questions & Answers

Output terminal sessions to screen and log file

I would like to use a terminal session to ssh to switches and routers. I need to capture data while logged into switches to a file I can email for troubleshooting. I use termial to log into Cisco switch, run the sh tech command, and then sent the output to cisco. Is there a way to run a... (4 Replies)
Discussion started by: tdelliott
4 Replies

8. UNIX for Advanced & Expert Users

redirect to both file and std output at the same time

hello can some one please help me to redirect the output of a command to both std output and a file. this is little urgent. sridhar (2 Replies)
Discussion started by: send2sridhar
2 Replies

9. UNIX for Advanced & Expert Users

Terminal Output to a File ??

Hey, How can I transfer the terminal output to a file ? For example : command "fuser" returns the "process-id" and prints the output on the terminal, but I want that output to a file as well. How can I do that ? /clocal/mqbrkrs/user/mqsiadm/sanjay/AccessMonitor $ fuser -uf... (2 Replies)
Discussion started by: varungupta
2 Replies

10. Solaris

terminal output - save to file?

I have a window open on my ultra 10 - a terminal window connecting to a server. Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)
Discussion started by: frustrated1
2 Replies
Login or Register to Ask a Question