Hi..Need help..


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Hi..Need help..
# 1  
Old 05-30-2008
Hi..Need help..

Hi,

Please help me.

This script is responsible of storing all the report in a line.

penfilename[i]=`echo ${OUTFILE}*"(${daterange})".csv`

OUTFILE=${OUT_DIR}"/PenetrationReport" and the OUT_DIR is this -

OUT_DIR=${MMHOME}/data/preticketing/penrpt.

The example of the generated report is this:

Code:
/app/rms/rms/data/preticketing/penrpt/PenetrationReport_(BAKER-10)_ByBuyer_(03-FEB-2008_31-JAN-2009).csv 
/app/rms/rms/data/preticketing/penrpt/PenetrationReport_(BAKER-10)_ByVendor_(03-FEB-2008_31-JAN-2009).csv

Now I want to remove the Output directory in the generated report. How can I do that?

I tried this Script:

Code:
penfilename[i]=`echo PenetrationReport*"(${daterange})".csv`

But it's not working because it gives me an output of:

Code:
PenetrationReport*(03-FEB-2008_31-JAN-2009).csv

The other reports were no longer generated. The loop did not work. What should I do to remove the output directory but the looping still works?

I've also attached the script that I was talking about. Hope it would help.

Thanks

Last edited by Yogesh Sawant; 05-30-2008 at 08:20 AM.. Reason: added code tags
# 2  
Old 06-02-2008
Where you write your report out to a file (I didn't look into the attachment, you have to look yourself Smilie ), pipe the output first through this:
Code:
herecomesmyoutput | sed 's/.*\/\([^/]\)/\1/g' >> mylog.out

 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question