Hey folks,
I've been working on this for some time. Seems simple, but I'm stumped.
I need the following data format:
New_York:Commercial
Geology
Geophysics
Petrophysics
Production_Engineering
Reservoir_Engineering
Pasadena:Commercial
Geology
Geophysics
Petrophysics
Production_Engineering
Reservoir_Engineering
To look like this:
New_York
Commercial
Geology
Geophysics
Petrophysics
Production_Engineering
Reservoir_Engineering
Pasadena
Commercial
Geology
Geophysics
Petrophysics
Production_Engineering
Reservoir_Engineering
I've used this command successfully in VI:
s/:/^M /g
But cannot seem to get it right within a script. I use the following line:
sed -e 's/:/^M /g' filename
but it will remove the "New_York:" which is what I need.
Any help would be greatly appreciated.
Thank You!