do not mangle space in while read line loop
This commit is contained in:
parent
749b08929b
commit
9658cc1405
2
snippy
2
snippy
@ -60,7 +60,7 @@ MENU_ARGS=${DMENU_ARGS}
|
|||||||
# fetches a document and interprets bashsyntax in string (bashdown) templates
|
# fetches a document and interprets bashsyntax in string (bashdown) templates
|
||||||
# @param string - string with bash(down) syntax (usually surrounded by ' quotes instead of ")
|
# @param string - string with bash(down) syntax (usually surrounded by ' quotes instead of ")
|
||||||
bashdown(){
|
bashdown(){
|
||||||
while read -r line; do
|
while IFS= read -r line; do
|
||||||
line="$(eval "printf -- \"$( printf "%s" "$line" | sed 's/"/\\"/g')\"")";
|
line="$(eval "printf -- \"$( printf "%s" "$line" | sed 's/"/\\"/g')\"")";
|
||||||
echo -e "$line"
|
echo -e "$line"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user