From: Ian Kelling Date: Tue, 29 Jul 2014 03:20:09 +0000 (-0700) Subject: fix bug wrong sed arguments X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=ff367964d27678cbbc93aff541e3b45274919668;p=tee-unique fix bug wrong sed arguments --- diff --git a/appendu b/appendu index 67e6834..460e363 100755 --- 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. - sed -ie '$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) diff --git a/appendu-function b/appendu-function index 13a7d74..35f16eb 100644 --- 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. - sed -ie '$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)