Quantcast
Channel: Felix021
Viewing all articles
Browse latest Browse all 125

xxd, join, and fold

$
0
0
1. Get character count in a line

引用

$ xxd packets | head -n 1 | wc -c
68


2. Join lines

引用

xxd packets | tr -d '\n' && echo


Save the output to local file "packets.xxd".

3. Fold lines and decode

引用

fold packets.xxd -w 67 | xxd -r > packets


Viewing all articles
Browse latest Browse all 125

Trending Articles