iankelling.org
/
git
/
tee-unique
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dc0386f
)
fix bug wrong sed arguments
author
Ian Kelling
<ian@iankelling.org>
Tue, 29 Jul 2014 03:20:09 +0000
(20:20 -0700)
committer
Ian Kelling
<ian@iankelling.org>
Tue, 29 Jul 2014 03:20:09 +0000
(20:20 -0700)
appendu
patch
|
blob
|
history
appendu-function
patch
|
blob
|
history
diff --git
a/appendu
b/appendu
index 67e68342a2bb18f614e6e429f375bee04ed9008d..460e363fd0223ad88718581cb7d3630da84fef58 100755
(executable)
--- a/
appendu
+++ b/
appendu
@@
-72,7
+72,7
@@
LINE_SETs are treated the same.
# e = run script, $a\ means append following text, but there is none,
# so sed only does what it always does when it was supposed to modify a file,
# which is append a newline if there was none.
# e = run script, $a\ means append following text, but there is none,
# so sed only does what it always does when it was supposed to modify a file,
# which is append a newline if there was none.
- sed -i
e
'$a\' "$file"
+ sed -i '$a\' "$file"
# command substitution removes any trailing newlines, so we have to add
# a non-newline ending, we randomly chose "b", then remove it.
local content=$(cat "$file"; echo b)
# command substitution removes any trailing newlines, so we have to add
# a non-newline ending, we randomly chose "b", then remove it.
local content=$(cat "$file"; echo b)
diff --git
a/appendu-function
b/appendu-function
index 13a7d740cd51548714ce6ff28730af2a495a3ada..35f16eb13a89514d939e945c39c1615648cdbfc8 100644
(file)
--- a/
appendu-function
+++ b/
appendu-function
@@
-72,7
+72,7
@@
LINE_SETs are treated the same.
# e = run script, $a\ means append following text, but there is none,
# so sed only does what it always does when it was supposed to modify a file,
# which is append a newline if there was none.
# e = run script, $a\ means append following text, but there is none,
# so sed only does what it always does when it was supposed to modify a file,
# which is append a newline if there was none.
- sed -i
e
'$a\' "$file"
+ sed -i '$a\' "$file"
# command substitution removes any trailing newlines, so we have to add
# a non-newline ending, we randomly chose "b", then remove it.
local content=$(cat "$file"; echo b)
# command substitution removes any trailing newlines, so we have to add
# a non-newline ending, we randomly chose "b", then remove it.
local content=$(cat "$file"; echo b)