sed -ie '$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) content=${content%b}
+ local content=$(cat "$file"; echo b)
+ content=${content%b}
fi
# we aren't using regex because we want to match strings,
sed -ie '$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) content=${content%b}
+ local content=$(cat "$file"; echo b)
+ content=${content%b}
fi
# we aren't using regex because we want to match strings,