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
You have several options
$ printf hello | xxd 0000000: 6865 6c6c 6f hello
See also: Ascii/Hex convert in bash