Please help!!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Please help!!!
# 15  
Old 07-20-2006
CARE01_DLY_???_YYYYMMDD
# 16  
Old 07-20-2006
Reborg,

If I give like CARE01_DLY_???_YYYYMMDD how can the system calculate that it's todays file only. I need to make sure that that is today file.

Do i need to give this like this

awk '{data[FNR] = $0; out=CARE01_DLY_???_date+%Y%m%d"_new"; file[FNR]=out;} END { if ( FNR - 2 == $1) { for ( i=2 ; i < FNR; i++ ) { print data > file[i]} close(file[i])}else { print "error"} }' CARE01_DLY_???_date+%Y%m%d

This is not working for me. Please suggest
# 17  
Old 07-20-2006
run it EXACTLY as updated above.
# 18  
Old 07-20-2006
Reborg,

I am getting the below error.

syntax error The source line is 1.
The error context is
{data[FNR] = $0; >>> out=CARE01_DLY_?? <<<
awk: The statement cannot be correctly parsed.
The source line is 1

Please suggest
# 19  
Old 07-20-2006
Quote:
Originally Posted by mhssatya

{data[FNR] = $0; >>> out=CARE01_DLY_?? <<<


Please suggest
That does not look exactly like what I posted.
# 20  
Old 07-20-2006
Reborg,

I am typing the whole code but after the last CARE0 statement it doesn't go any further. What should I do. If i copy paste the last statements are not getting printed. Do i need to keep that in a script? Kindly let me know.

Please suggest.
# 21  
Old 07-20-2006
It looks like the line is too long for your shell.

If you can change shell to bask just to try the command it would be good.
Login or Register to Ask a Question

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