X-Git-Url: https://iankelling.org/git/?p=tee-unique;a=blobdiff_plain;f=appendu-function;h=35f16eb13a89514d939e945c39c1615648cdbfc8;hp=13a7d740cd51548714ce6ff28730af2a495a3ada;hb=ff367964d27678cbbc93aff541e3b45274919668;hpb=dc0386f28d2e917f8a5a81ff66bcd26d3b029e42 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)