Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove spaces in a file 1

Status
Not open for further replies.

Yanndewael

Programmer
Mar 14, 2003
12
GB
Hello,

I have a file with lines such as:
[0,,125554656,+ 14.57,000000,0,0]
[1,2,125433545,- 1234568.24,000,0,0]
...

And I want to write a script removing the spaces between the sign (+ or -) and the amount.
Which command should I use? Perl?

Thank you in advance
 
sed -e 's/\([+-]\)[ ]*/\1/g' myFile

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top