将16进制string转成16进制stream

script  sstream.sh:

#!/bin/bash
for num in $(echo "9e 8b 5a")
do
    echo $((16#$num)) | awk '{printf("%c", $0);}'
done

Invoke the script:

$bash sstream.sh | hexdump -C
00000000  9e 8b 5a                                          |..Z|
00000003



你可能感兴趣的:(c,String,Stream,bash)