iankelling.org
/
git
/
bash-template
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4280d23
)
fix log redirection
author
Ian Kelling
<ian@iankelling.org>
Mon, 18 Jul 2016 00:27:43 +0000
(17:27 -0700)
committer
Ian Kelling
<ian@iankelling.org>
Fri, 12 Aug 2016 20:38:59 +0000
(13:38 -0700)
bash-template
patch
|
blob
|
history
diff --git
a/bash-template
b/bash-template
index 6812856040d606a918876ec58d1f438a4b08d18e..5d7e70228e7e00c837adb8909284494e6c75604c 100644
(file)
--- a/
bash-template
+++ b/
bash-template
@@
-63,12
+63,12
@@
cd "${BASH_SOURCE%/*}"
########
# example of redirecting all output to a log, then restoring
-exec 3>&1
; exec
4>&2
+exec 3>&1 4>&2
exec &>> /tmp/testlog
echo some stuff
-<&3 3<&-; <&4 4<&- # restore & delete extra fds
+exec >&3 2>&4 # restore
#### END SECTION