❯ ./tv.sh currentChannel
tr: Illegal byte sequence
./tv.sh: line 70: $1: unbound variable
❯ ./tv.sh
<selected Option 1>
tr: Illegal byte sequence
Please enter 4 digit PIN code from your TV:
9969
base64: invalid option -- d
Usage: base64 [-hvD] [-b num] [-i in_file] [-o out_file]
-h, --help display this message
-D, --decode decodes input
-b, --break break encoded string into num character lines
-i, --input input file (default: "-" for stdin)
-o, --output output file (default: "-" for stdout)
I will try to help, when I get around to have a look at your source code. For now, let me just report these errors here for future reference!
Running macOS on most recent macOS Mojave 10.14.3.