Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

[opensuse 12.2 mantis] sed command -- how to

$
0
0
Greetings !!

I'm searching a way to delete all the spaces (0x20 '\ ' caracters) from a file named map3.cssm.

It works with sed 's/\ //g' map12x12/map3.cssm > map12x12/map003.cssm but I wanted to redirect the result displayed by sed to the file itself.

sed 's/\ //g' map12x12/map3.cssm > map12x12/map3.cssm resulted to an emply file
sed 's/\ //g' map12x12/map3.cssm >> map12x12/map3.cssm resulted to a double content !

Code:

220000000010
000022000000
200000000100
200030000000
000030001000
200300000050
000000010050
000030000050
004030100050
004030333050
004000000000
004004444000
220000000010
000022000000
200000000100
200030000000
000030001000
200300000050
000000010050
000030000050
004030100050
004030333050
004000000000
004004444000

How can I save the "seded" result to the file itself ?
And it there a way to apply this sed with a wildcard ?

sed 's/\ //g' map12x12/map*.cssm

Thanx in advance !!

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>