Closed lorenzleutgeb closed 9 years ago
From my understanding this should have the exact same behaviour as the sed
version.
Unintended side effects may arise should Github ever decide to include a newline of their own. I'm not sure on the behaviour of read on an empty line but I think it will be skipped.
From my understanding this should have the exact same behaviour as the
sed
version.
What's the sed
expression saying anyway?
I'm not sure on the behaviour of read on an empty line but I think it will be skipped.
I got
""
""
from
#!/bin/bash
echo -e "\n" | while read line
do
echo -e "\"$line\""
done
which indicates that empty lines are not skipped.
Guarding with [ "" != "$line" ]
will work, though.
This is a variation of e0c04f025c
What did the
sed
command actually do?curl
will now always append a newline. In casesed
was more sophisticated about when to append the newline, this could break something.