Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- log_file="/some/dir/log_file.log"
- echo "some text" >> $log_file
- do_some_command
- echo "more text" >> $log_file
- do_other_command
- command | tee -a "$log_file"
- . 8<<-IOHERE /proc/self/fd/8
- command
- …
- fn() { declaration ; } <<WHATEVER
- # though a nested heredoc might be finicky
- # about stdin depending on shell
- WHATEVER
- cat -u ./stdout | ./works.as >> expect.ed
- IOHERE
- cat ./*.sh | . /dev/stdin
- . 5<<EOIN /dev/fd/5 |
- tee -a ./log.file | cat -u >$(tty)
- script
- …
- more script
- EOIN
- . 3<<HD ${fdpath}/3
- : ${vars=$(printf '${var%s=$((%s*2))},' `seq 1 100`)}
- HD
- echo $vars
- > 4,8,12…
- echo $var1 $var51
- > 4 104
- { or ( command ) list ; } | tee -a ea.sy >>pea.sy
- echo "Found OLD run script $oldrunscriptname"
- echo "Please run OLD tmunsetup script first!"
- #!/bin/bash
- # A Shell subroutine to echo to screen and a log file
- LOGFILE="junklog"
- echolog()
- (
- echo $1
- echo $1 >> $LOGFILE
- )
- echo "Going"
- echolog "tojunk"
- # eof
Add Comment
Please, Sign In to add comment