was wondering if anyone could help me with converting ascii to hex in bash. Example code:
#!/bin/bash STR = \"hello\" #Convert to hex HEXVAL = $STR #(in hex
xxd -p -u <<< "$STR" | sed 's/\(..\)/0x&, /g; s/, $//;'
0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x0A