Hello everyone,
I've spent some time this week trying to get things going in a SSH Shell (/Base [1.21.7]/Library/Operations/Remote Command Execution/Remote Shell) but despite my efforts I'm still stuck with management breathing down my neck.
The context is that I have to automate the "cleaning" of 9 files some as large as 5GB and the issue is that the SSH remote shell step does not wait for the full command to finish before marking it as resolved and jumping to the next step which is a powershell step containing an upload to Google bucket function. It cleans maybe 100 something MB of data and marks and then uploads it right away.
What can I use to overcome this?
The step Inputs I use:
note that readTimeout and timeout should put a brake on it but it's not the case
And the command:
expect (.*\s*)*?
send #!/bin/bash
expect (.*\s*)*?
send DATA_DIR=/mnt/c/Users/xxxx
expect (.*\s*)*?
send FILE_NAME=ZQC_SADOFL.txt
expect (.*\s*)*?
send cat ${DATA_DIR}/${FILE_NAME} | sed 's///g' | sed 's/\r$//g' | sed ':a;N;/\n300|/!s/\n/ /;ta;P;D' > ${DATA_DIR}/${FILE_NAME:(0):(-4)}-CLEAN-.txt
expect ^$$
I've tried to use at the end "expectEndsWith ^$$ but it doesn't work giving the error that "
(exception=Script did not fully finish, had: 1 commands left )
Any help or hint will be greatly appreciated.
Best regards,
Alan