String to Hex

Convert a string to its hexadecimal representation.

Code

Utilities
echo -n "$str" | xxd -p | tr -d '\n'

Parameters

The string to convert to hex.

Server

More Bash Snippets