Skip to content

Commit

Permalink
use printf inplace of echo - echo fails somehow to escape \n and \r c…
Browse files Browse the repository at this point in the history
…hars
  • Loading branch information
c00kiemon5ter committed Nov 9, 2013
1 parent f135aaf commit 3672838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iii.sh
Expand Up @@ -91,7 +91,7 @@ do
# fold lines breaking on spaces if message is greater than 'w' chars or does not fit
mw="$(($(tput cols) - ${#date} - ${#time} - $m - 5))"
[ "$mw" -gt "$w" ] && mw="$w"
echo "$line" | fold -s -w "$mw" | while IFS= read -r mesg; \
printf '%s\n' "$line" | fold -s -w "$mw" | while IFS= read -r mesg; \
do
[ "$p" -gt 1 ] && mesg="$(echo "$mesg" | sed \
-e "s,\(^\|[[:space:]][[:punct:]]*\)\([_][[:alnum:][:punct:]]\+[_]\)\([[:punct:][:space:]]\|$\),\1${su}\2${eu}\3,g" \
Expand Down

0 comments on commit 3672838

Please sign in to comment.