change text

I have a text file with lots of space or tabs in. Is there an easy way to remove the spaces or tabs within unix?

A.
aiacbAsked:
Who is Participating?
 
mrn060900Connect With a Mentor Commented:
yes use sed

create a script using vi and enter the following

#!/usr/bin/sed
s/[  ][  ]/ /g

inbetween the [ ] put a space and a tab

save it as change
chmod 700 change

then change < oldfile > newfile

Regards Mike
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.