![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| capture output of file and send last string thereof to new file | Lorna | Shell Programming and Scripting | 6 | 10-06-2008 05:38 PM |
| script to capture certain output | fara_aris | Shell Programming and Scripting | 18 | 08-15-2008 12:07 AM |
| capture shell output in cron entry | steve72 | UNIX for Dummies Questions & Answers | 5 | 04-17-2008 12:00 PM |
| Capture output to file and printer | rdasari | UNIX for Advanced & Expert Users | 1 | 01-16-2008 03:57 PM |
| Capture output from interactive script | MizzGail | Shell Programming and Scripting | 6 | 04-04-2002 06:24 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Capture Shell Script Output To A File
Hi,
I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window $./dbProcess.sh stop #### Run Details ###### Hostname : server-hop-1 RunDate : 01-13-09 RunTime : 09:43:14 #### ########### ###### ############################################################################## /u01/app/oracle/product/9.2 /u01/app/oracle it9 ############################################################################## ############################################################################## # Setting Environment Variables For SID : # it9 ############################################################################## ############################################################################## # Contents Of Connection Out File # ############################################################################## ############################################################################## # Killing Active DB Connections # ############################################################################## Connected. Database closed. Database dismounted. ORACLE instance shut down. ############################################################################## I would like to create an output file being at the time of executing the dbProcess.sh and the process must write all the output lines of the dbProcess.sh to this file. I would like to clarify that i am not looking for any kind of redirection commands using the > or >> symbol. What i am looking out for is a series of commands that i will be able to add to my dbProcess.sh shell script which will start a log file write all the shell output to the logfile and at the end of it save and exit the log file. I dont mind if the output is not showing up on the stdout for me most important aspect is the creation of this logfile and to write all output to this logfile. I tried the to add lines to dbProcess.sh using the unix script command.But it did not work because when the shell script executed the script command line it stopped and waited for me to type exit for it to continue. Please let me know if you have any clarification. Thanks and kind Regards, Rajan.S |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|