How to capture the output of one shell script into other in unix -


i running 1 shell script run_sftp.sh output either "done" or "failed" , calling script script execute command if run_sftp.sh output "done"

if [ output(run_sftp.sh) = 'done' ]   echo "run" else   "stop running" fi  

this algorithm. please suggest.

like this?

retval=$(path/to/run_sftp.sh) 

now have done/failed in var retval. can if check logic.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

C# - WPF - ColumnGroups Footer? (telerik) -

Laravel Bind Multiple Class to One Contract in The Service Provider -