Skip to contentSkip to conversation

[6945] Fix hxtool eating backslash sequences

Qemu-devel Blue Swirl 1 participant 1 message Mar 29, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 6945

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6945
Author:   blueswir1
Date:     2009-03-29 09:06:43 +0000 (Sun, 29 Mar 2009)

Log Message:
-----------
Fix hxtool eating backslash sequences

Modified Paths:
--------------
trunk/hxtool

Modified: trunk/hxtool
===================================================================

hxtool +3 -3
@@ -3,14 +3,14 @@
 hxtoh()
 {
     flag=1
-    while read str; do
+    while read -r str; do
         case $str in
             HXCOMM*)
             ;;
             STEXI*|ETEXI*) flag=$(($flag^1))
             ;;
             *)
-            test $flag -eq 1 && echo $str
+            test $flag -eq 1 && echo "$str"
             ;;
         esac
     done
@@ -19,7 +19,7 @@
 hxtotexi()
 {
     flag=0
-    while read str; do
+    while read -r str; do
         case "$str" in
             HXCOMM*)
             ;;