Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #set non-existing folder
  2. local_path="~/njn"
  3. log_path_file="test.log"
  4. cmd="ls -l ${local_path} | tee -a ${log_path_file}";
  5. eval ${cmd}
  6.  
  7. returncode=$?
  8. echo "execution result: ${returncode}" | tee -a ${log_path_file};
  9.  
  10. if [ ${returncode} -eq 0 ]; then
  11. echo "success" | tee -a ${log_path_file}
  12. else
  13. echo "not success" | tee -a ${log_path_file}
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement