The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-20-2008
Shivdatta Shivdatta is offline
Registered User
 

Join Date: Mar 2006
Location: Mumbai
Posts: 67
You may use the following in ur script ...

Code:
logfile=test.log
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

exec 1>${logfile}
exec 2>&1


This will redirect the standard o/p(indicated by 1) and standart error ( indicated by 2) to the test.log file.
Hope this helps !!
Reply With Quote