Issue
Good day people!
Today, I was wondering how to paste several files with this delimiter: ,,
.
When I use like:
paste -d',,' ...
The output only introduce one ,
I need double comma for better handling csv files, Thanks in advance for any clue
Solution
If you can identify a character which is not used in the file, you can do this in two steps.
paste -d '~' file1 file2 | sed 's/~/,,/'
Obviously, if the tilde already exists in your data, use a different delimiter. A control character could be a fairly safe bet, at the expense of being slightly pesky to manipulate. (In Bash, you can use e.g. $'\001'
to produce a ctrl-A, etc.)
Answered By - tripleee