Skip to content

Instantly share code, notes, and snippets.

@Arno0x
Last active June 22, 2020 14:21
Show Gist options
  • Save Arno0x/c2b809711fa9e8bd807310729185246f to your computer and use it in GitHub Desktop.
Save Arno0x/c2b809711fa9e8bd807310729185246f to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ $1 == "-i" ]]; then
result=$(cat $2 | iconv --to-code UTF-16LE | base64 -w 0)
else
result=$(echo "$1" | iconv --to-code UTF-16LE | base64 -w 0)
fi
echo $result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment