Skip to content
Advertisement

Adding delimiters and removing commas

I have a file from which I’ve output several columns of information, 4 to be exact. At this moment they are separated by commas, but in order for my buddy to feed them into another script, he wants the format to be with ‘|’ as delimiter and the commas removed. The commas follow every set of data, so after my script outputs this:

JavaScript

what I need is:

JavaScript

Advertisement

Answer

JavaScript

will work for your test case.

Alternatively, you could get crazy with something like

JavaScript

Which may be more flexible depending on your needs.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement