# 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)
# 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)