Article 4VBKW stop sed from replacing unicode hex characters

stop sed from replacing unicode hex characters

by
bradvan
from LinuxQuestions.org on (#4VBKW)
I have a variable with some unicode hex characters: Code:LABEL=$(blkid CentOS-7-x86_64-DVD-1810.iso | awk '{ print $2, $3, $4 }' | sed -e 's| | \\x20|g' | sed -e 's|"||g") which results in: Code:echo ${LABEL}
LABEL=CentOS\x207.6\x20x86_64 Now, I want to insert that in a file: Code:sed -e "/^label linux/ i label kickstart\n menu label ^Kickstart CentOS 7\n kernel vmlinux\n append initrd=initrd.img inst.stage2=hd:${LABEL} inst.ks=cdrom:/ks.cfg\n" isolinux.cfg which changes the unicode hexCode:\x20 back to a space. Any ideas on how to keep that from happening?latest?d=yIl2AUoC8zA latest?i=S53zjONBX5I:urCATIqLFlY:F7zBnMy latest?i=S53zjONBX5I:urCATIqLFlY:V_sGLiP latest?d=qj6IDK7rITs latest?i=S53zjONBX5I:urCATIqLFlY:gIN9vFwS53zjONBX5I
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments