In csv file couple of lines dont fit the data I need. For example, this is my example.csv file:
14/Feb/2016:13:21:33-0500,mk
15/Feb/2016:14:21:33-0500,mk
16/Feb/2016:15:21:33-0500]http://map1.link.de/mk
17/Feb/2016:16:21:33-0500]http://map5.link.de/mk
I can fetch that lines and correct them with:
$ cat example.csv | grep "map" | sed 's/\(.*\)].*\/\(.*$\)/\1,\2/'
Result:
16/Feb/2016:15:21:33-0500,mk
17/Feb/2016:16:21:33-0500,mk
But what I really want is to correct them and save them like that in the same file. How can I do that?