iankelling.org
/
git
/
log-quiet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
704248c
)
change to more appropriate printf
author
Ian Kelling
<ian@iankelling.org>
Thu, 24 Jul 2014 01:27:14 +0000
(18:27 -0700)
committer
Ian Kelling
<ian@iankelling.org>
Thu, 24 Jul 2014 01:27:14 +0000
(18:27 -0700)
logq
patch
|
blob
|
history
logq-function
patch
|
blob
|
history
diff --git
a/logq
b/logq
index b88e35eed47ddbee97ffee2a7211fadcddfa53dd..2ac002635d89be7d2ce15f23c911f85f79543a1d 100755
(executable)
--- a/
logq
+++ b/
logq
@@
-30,9
+30,7
@@
$help"
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
- echo "log of $prettycommand" >"$file"
- date >>"$file"
- echo >>"$file"
+ printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
# we will propagate any errors
local e=$-
# we will propagate any errors
local e=$-
@@
-41,10
+39,7
@@
$help"
local ret=$?
[[ $e == *e* ]] && set -e
local ret=$?
[[ $e == *e* ]] && set -e
- echo >>"$file"
- echo "----------------" >>"$file"
- date >>"$file"
- echo "end of log" >>"$file"
+ printf "\n%s\n%s\n%s" "----------------" "$(date)" "end of log" >>"$file"
echo -n "\$?=$ret "
echo -n "$prettycommand"
echo -n "\$?=$ret "
echo -n "$prettycommand"
diff --git
a/logq-function
b/logq-function
index c2b99f21445e5e45d1079c29cf0df0dff61b1f55..8b930641a8222fba7134e19c148e5592e32c7c4b 100644
(file)
--- a/
logq-function
+++ b/
logq-function
@@
-30,9
+30,7
@@
$help"
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
- echo "log of $prettycommand" >"$file"
- date >>"$file"
- echo >>"$file"
+ printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
# we will propagate any errors
local e=$-
# we will propagate any errors
local e=$-
@@
-41,10
+39,7
@@
$help"
local ret=$?
[[ $e == *e* ]] && set -e
local ret=$?
[[ $e == *e* ]] && set -e
- echo >>"$file"
- echo "----------------" >>"$file"
- date >>"$file"
- echo "end of log" >>"$file"
+ printf "\n%s\n%s\n%s" "----------------" "$(date)" "end of log" >>"$file"
echo -n "\$?=$ret "
echo -n "$prettycommand"
echo -n "\$?=$ret "
echo -n "$prettycommand"