[英]Get non ASCII character in shell Linux
我有一個返回非ASCII編碼的base64結果的命令,如何在shell變量中獲取結果。
有解決方案嗎?
例:
$ mycommand|base64 -d > f
# verify presence of character with hexdump command
$ hexdump -C f
00000000 06 05 03 01 |....|
00000004
我找到了解決方案:
$ a=`mycommand|base64 -d|hexdump -v -e '1/1 "%02X"'`
$ echo $a
06050301
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.