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

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

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