Linux bash script to ignore '$'
Cute idea. It's not so simple, though.
For example, compare the outputs of
echo 'a   b'

with
$ echo 'a   b'

(because of word splitting).
Also, it fails for compound commands like
for i in a b c ; do echo $i ; done

(because everything after the first ; is another command).
Some commands might fail depending on the contents of the current directory, e.g.
$ [[ a = ? ]]

(if it works, try running touch 1 2 3).