I am working on an application about windows rdp. Now I get a problem when I try to use the sed command to replace the string of IP address directly in the rdp file. But after executing this command, the origin rdp file is garbled.
sed -i "s/address:s:.*/address:s:$(cat check-free-ip.to.rdpzhitong.rdp)/" rdpzhitong.rdp
I find that the file's format is Little-endian UTF-16 Unicode.
Can I still use the sed command to replace the text in the files correctly? Or other method to process this problem?