Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #set non-existing folder
- local_path="~/njn"
- log_path_file="test.log"
- cmd="ls -l ${local_path} | tee -a ${log_path_file}";
- eval ${cmd}
- returncode=$?
- echo "execution result: ${returncode}" | tee -a ${log_path_file};
- if [ ${returncode} -eq 0 ]; then
- echo "success" | tee -a ${log_path_file}
- else
- echo "not success" | tee -a ${log_path_file}
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement