Guest User

Untitled

a guest
Feb 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. log_file="/some/dir/log_file.log"
  2. echo "some text" >> $log_file
  3. do_some_command
  4. echo "more text" >> $log_file
  5. do_other_command
  6.  
  7. command | tee -a "$log_file"
  8.  
  9. . 8<<-IOHERE /proc/self/fd/8
  10.  
  11. command
  12. fn() { declaration ; } <<WHATEVER
  13. # though a nested heredoc might be finicky
  14. # about stdin depending on shell
  15. WHATEVER
  16. cat -u ./stdout | ./works.as >> expect.ed
  17. IOHERE
  18.  
  19. cat ./*.sh | . /dev/stdin
  20.  
  21. . 5<<EOIN /dev/fd/5 |
  22. tee -a ./log.file | cat -u >$(tty)
  23. script
  24. more script
  25. EOIN
  26.  
  27. . 3<<HD ${fdpath}/3
  28. : ${vars=$(printf '${var%s=$((%s*2))},' `seq 1 100`)}
  29. HD
  30. echo $vars
  31. > 4,8,12…
  32. echo $var1 $var51
  33. > 4 104
  34.  
  35. { or ( command ) list ; } | tee -a ea.sy >>pea.sy
  36.  
  37. echo "Found OLD run script $oldrunscriptname"
  38. echo "Please run OLD tmunsetup script first!"
  39.  
  40. #!/bin/bash
  41. # A Shell subroutine to echo to screen and a log file
  42.  
  43. LOGFILE="junklog"
  44.  
  45. echolog()
  46. (
  47. echo $1
  48. echo $1 >> $LOGFILE
  49. )
  50.  
  51.  
  52. echo "Going"
  53. echolog "tojunk"
  54.  
  55. # eof
Add Comment
Please, Sign In to add comment