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 > Shell Programming and Scripting
.
google unix.com



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
run shell script from oracle store procedure arnabb4u Shell Programming and Scripting 8 08-16-2006 12:16 PM
How to run an SQL script inside a shell stevefox Shell Programming and Scripting 1 06-15-2006 10:11 PM
How to run unix commands in a new shell inside a shell script? hkapil Shell Programming and Scripting 2 01-04-2006 06:56 AM
Using tar inside a shell script kas7225 Shell Programming and Scripting 2 05-19-2005 11:06 PM
Store return code of shell script in oracle table sveera Shell Programming and Scripting 3 05-04-2005 01:25 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-20-2008
sunitachoudhury sunitachoudhury is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 36
How to store the outputs of a shell script inside a log file???

My shell script file name is test.sh and the contents of this test.sh file are

Code:
ps_file="package1.ps"
echo $ps_file
ps_file1=`echo $ps_file| sed "s/.ps//g"`
echo $ps_file1
ps2pdf -dSAFER -sPAPERSIZE=a4 /tmp/A380_RFS24/amm_r0_ps/$ps_file1.ps /tmp/A380_RFS24/amm_r0_pdf/$ps_file1.pdf
Now i want to store the output of this test.sh file in test.log file.

For this i have written the following command

Code:
test.sh > test.log
But i don't want to store the output like the above methods.

Can i do this one like the following ways????
Code:
ps_file="package1.ps"
echo $ps_file > test.log
ps_file1=`echo $ps_file| sed "s/.ps//g"`
echo $ps_file1 > test.log
ps2pdf -dSAFER -sPAPERSIZE=a4 /tmp/A380_RFS24/amm_r0_ps/$ps_file1.ps /tmp/A380_RFS24/amm_r0_pdf/$ps_file1.pdf > test.log

Last edited by Yogesh Sawant; 03-20-2008 at 07:23 AM.. Reason: added code tags
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0