Bash encoding and more