I am new to this shell-script programming so need your help to write a code which is efficient one.
Input file format :
60 00 00 00
00 90 32 20
00 00 00 00
.....
Output File format:
6000 0000 0090 3220 0000 0000 0000 0000
0000 0000 0000 0001 0000 0000 0000 0000
......
I want to convert input file to output file and vice-versa so need code for both sides.
Code should be in linux shell script using filters like awk,sed,grep,etc using pipe and linux redirection operators…
Limitation
A single line would be best otherwise as much lesser no. of lines as possible
Here’s a rather simple solution to this problem.
I’m not sure if you need to insert a new line after 8 blocks, but if so, a regex like
s/(.*){32}/$1\n/gshould do the trick.