16進数を変更する簡単なコマンドはありますか?
たとえば、16進数を指定すると、次のようになります。
030201
出力は次のようになります。
010203
このrev
コマンドを使用すると、次のような結果が得られます。
102030
修正する
$ bash --version | head -n1
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
$ xxd -version
xxd V1.10 27oct98 by Juergen Weigert
$ rev --version
rev from util-linux 2.20.1
ベストアンサー1
fold
++で:tac
tr
$ echo 030201|fold -w2|tac|tr -d "\n"
010203
fold
- 2バイトごとに分割tac
- リバース猫tr
- 改行文字を削除