Guest User

Untitled

a guest
Oct 19th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. TM_LOCAL=`ls -l --time-style=long-iso ~/.vimrc | awk '{ print $6" "$7 }'`
  2.  
  3. ls -l --time-style=long-iso ~/.vimrc | awk '{ print $6" "$7 }'
  4.  
  5. TM_LOCAL=$(ls -l --time-style=long-iso ~/.vimrc |
  6. awk '{ print $6" "$7 }' ; exit ${PIPESTATUS[0]} )
  7.  
  8. result=$(echo -e "anbnc" |
  9. ( cat ; exit 1 ) |
  10. ( cat ; exit 42 ) ; echo ${PIPESTATUS[@]})
  11. output=$(head -n -1 <<< "$result")
  12. status=($(tail -n 1 <<< "$result"))
  13. echo "Output:"
  14. echo "$output"
  15. echo "Results:"
  16. echo "${status[@]}"
  17.  
  18. Output:
  19. a
  20. b
  21. c
  22. Results:
  23. 0 1 42
  24.  
  25. declare -a status
  26. status=(${PIPESTATUS[@]})
  27.  
  28. [[ -f ~/.vimrc ]] && TM_LOCAL=$(stat -c '&y' ~/.vimrc 2>/dev/null)
  29. TM_LOCAL=${TM_LOCAL%:*} # Safe to do, even if stat fails
  30.  
  31. ./testcron | (test ${PIPESTATUS[0]} -ne 0 || mail -s "testcron output" paul)
Add Comment
Please, Sign In to add comment