Does anyone know any unix commands/perl script that would insert a specific character (that can be entered as either hex (ie 7C) or as the actual character (ie |)) in the po
How about a nice, simple awk one-liner?
awk
awk -v RS=, '{ORS=(++i%3?",":"|");print}' file.csv
One minor bug just occurred to me: it will print a , or | as the very last character. To avoid this, we need to alter it slightly:
,
|
awk -v RS=, '{ORS=(++i%3?",":"|");print}END{print ""}' file.csv | sed '$d'