On unix if I do
printf "aY.S'Hk([;jYJ}8eJ5)Wsd58/x}s]Pne3V-6:t@" | xxd -p -c 256
I get
61592e5327486b285b3b6a594a7d38654a352957736435382f787d735d50
6e6533562d363a7440
However on mac os (which is what I want on linux as well)
I get
61592e5327486b285b3b6a594a7d38654a352957736435382f787d735d506e6533562d363a7440
I couldn't find any way to prevent xxd
from adding a line break to hex output. I have tried sed
to remove the line break but it doesn't work. I can't install tr
on my unix machine. Is there any way I can create a hex output from my string that doesn't have any line break or whitespace or is there a way to configure xxd
on linux to not add any whitespace? Note, I have tried pretty much all the options of xxd
with no luck
Asked by java_doctor_101
(111 rep)
Feb 15, 2022, 02:51 AM
Last activity: Jun 10, 2023, 05:23 AM
Last activity: Jun 10, 2023, 05:23 AM