How to make a valid input for “xxd -r” in vim when removing a byte?
Create a file named as test containing the following content: 0123456789abcdef0123456789abcdef I want to remove the first 0 with the use of xxd. Open it with vim -b test then run :%!xxd inside vim. The result is: 0000000: 3031 3233 3435 3637 3839 6162 6364 6566 0123456789abcdef 0000010: 3031 3233 3435 3637 3839 6162 6364 6566 0123456789abcdef 0000020: 0a . Then I remove the hex code 30 for the first 0 : 0000000: 31 3233 3435 3637 3839 6162 6364 6566 0123456789abcdef 0000010: 3031 3233 3435 3637 3839 6162 6364 6566 0123456789abcdef 0000020: 0a . Then I run :%!xxd -r to read the hex back. The