1

Here is my CSV :

"de,aabauerschaft,Aabauerschaft,07,1,52.083333,7.383333"

"de,aach,Aach,01,1,47.85,8.85"

I tried this : sed 's/[[:blank:]]*//g' GermanCities_1.csv

expected this :

"de,aabauerschaft,Aabauerschaft,07,1,52.083333,7.383333"
"de,aach,Aach,01,1,47.85,8.85"

returns error : sed: RE error: illegal byte sequence

If anyone could help i'd thank him so much !

Julien
  • 107
  • 1
  • 7
  • First are you sure it's a good idea to unconditionally strip spaces? What would my beloved *Bad Homburg* look like afterwards? – trojanfoe Feb 02 '16 at 13:26
  • you can use `sed ':a;N;$!ba;s/\n/ /g' as written here : [http://stackoverflow.com/questions/1251999/how-can-i-replace-a-newline-n-using-sed](http://stackoverflow.com/questions/1251999/how-can-i-replace-a-newline-n-using-sed) – spokeek Feb 02 '16 at 13:33

1 Answers1

0

You can use sed ':a;N;$!ba;s/\n/ /g'

Just look at this link : How can I replace a newline (\n) using sed?

Community
  • 1
  • 1
spokeek
  • 16
  • 1