awk question

I am trying to read through a file, gather the states in that file and change it from an abbreviation to the ful text.

Can anyone provide some assistance.

Thanks!!

Try sed -

command file: state.sed:

s/TX/Texas/
s/MD/Maryland/
s/NY/New York/
s/AZ/Arizona/

text file: myfile

I am from TX
NY is where I come from
We are all from MD
sed -f state.sed myfile

gives this output:
I am from Texas
New York is where I come from
We are all from Maryland

Beware of other abbreviations like MD for medical doctor.

Thanks but I am not familiar with sed at all

This wouldnt be for a homework assignment would it? In Jim's post above, he gave you just about all you need to know to use sed. All that is left is for you to redirect the output of your sed commands to a file. Whats wrong with learning something new? Besides, you did not post the language (nor OS) that you are using to help solve your problem!

Exactly! cnitadesigner - do some basic research. I just typed sed tutorial into google.com and got 139,000 results!

Cheers
ZB