Might be a bit ugly, but echo -e
should do it:
echo -en "$(curl $URL)"
-e
interprets escapes, -n
suppresses the newline echo
would normally add.
Note: The u
escape works in the bash builtin echo
, but not /usr/bin/echo
.
As pointed out in the comments, this is bash 4.2+, and 4.2.x have a bug handling 0x00ff/17 values (0x80-0xff).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…