![]() |
|
|||||||
| Home | Forums | Register | Rules & FAQ | Donate | Members List | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
![]() |
|
|
Submit Tools | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Printing output to the monitor
Hi!,
In my shell scripts, I always create a logfile by adding the following line in the beginning: exec >file.log 2>&1 This in turn directs all the output to this logfile till the script executes. But now, I have to write some output to the monitor for the users. So, i am doing it by the following method: ======================== CUR_DEVICE=`tty` echo "Whatever to be outputed" >$CUR_DEVICE ======================== This works for me.. But is there any better way than this?? |
| Forum Sponsor |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| printing output more than 13 | Krrishv | Shell Programming and Scripting | 2 | 01-22-2007 03:35 AM |
| Printing to a Savin - Size of output wrong | h1timmboy | AIX | 2 | 02-28-2006 07:19 AM |
| How to monitor pty | l-roner | AIX | 2 | 07-08-2005 09:17 AM |
| PC monitor | mangolinux | SUN Solaris | 1 | 02-14-2005 02:58 PM |
| Printing Problems in unix ... ( Bar-cdoe - Ip Printing) | QuickSilver | UNIX for Advanced & Expert Users | 3 | 06-04-2002 09:48 AM |