-1
I have a csv that’s exported like this:
+++ Host - Begin +++,,
Name,Description
test1,abc2
test2, abd3
+++ Host - End +++,,
How do I get this result?
+++ Host - Begin +++
Name,Description
test1,abc2
test2, abd3
+++ Host - End +++
-1
I have a csv that’s exported like this:
+++ Host - Begin +++,,
Name,Description
test1,abc2
test2, abd3
+++ Host - End +++,,
How do I get this result?
+++ Host - Begin +++
Name,Description
test1,abc2
test2, abd3
+++ Host - End +++
0
Apparently the sed would solve in a simple way this example you gave:
sed s/,,//g
Assuming the text format is:
+++ Host - Begin +++,,
Name,Description
test1,abc2
test2,abd3
+++ Host - End +++,,
Removing all "," from the text:
cat meuarquivo.csv | sed s/,,//g
# ou
sed s/,,//g meuarquivo.csv
Browser other questions tagged script csv shell-script
You are not signed in. Login or sign up in order to post.
I forgot to ask, are you using Windows or Linux?
– Tom Melo
I’m using Windows, already solved the problem in question. when I run the command, in the terminal the file appears to me without such ",," but does not save the changes to the file
– user95385
Then you need to save the output result, maybe adding > at the end of the resolve command: sed s/,//g myfile.csv > newfile.csv
– Tom Melo