you must use the sed command. this command:
sed s/"a"/"1"/ file.txt > file2.txt
will replace all 'a' characters into '1' characters from file 'file.txt' and it writes the new file with changed characters to 'file2.txt'. you may do much more complicated things with sed, wich I don't know
read the man page (man sed) for more information!
-= iluvatar =-