In the terminal type
"cd /boot"
that will put in the boot directory, inside that directory is config.txt.
to open and edit it type
"sudo nano config.txt"
or you could open it from anywhere by typing "sudo nano /boot/config.txt"
What i would like to know is how could you turn this into a shell script?