Page 1 of 1

EXECSH command for file in

Posted: Fri Aug 17, 2018 3:29 pm
by faujong
How can I use the following EXECSH command in After-job subroutine ?

Code: Select all

for file in /dev/DataStage/myProject/source/TEST/MyFile_*.csv; do echo "Testing" done
The above code gives an error "sh: -c: line 1: syntax error: unexpected end of file"

Thank you

Posted: Fri Aug 17, 2018 5:04 pm
by chulett
I would highly suggest you do all of your testing directly from the server's command line and get something working there on a single line. Once it's working, stick it in your ExecSH.

Posted: Sun Aug 19, 2018 6:31 pm
by ray.wurlod
Perhaps another semi colon between the echo command and the done loop terminator?

Posted: Mon Aug 20, 2018 9:06 am
by faujong
Yes, that's it. Thank you Ray!!