I am attempting to do the matasano cryptopals challenges in bash.
The first step is here
I found this stackexchange thread with a partial solution.
printf 49276d2 | xxd -r -p | base64
which produces SSdt as wanted.
I am looking to make a bash script so I can simply do
hexto64 49276d2
and get the same result. I'm not sure where to start after the #!/bin/bash . I have not found a similar example which takes arguments and pipes them through other commands and then outputs a result.