Despite looking again at the sed/awk book, I don't see how to write a
functioning script. The input file is 39M (almost 111K lines) and sed it the
right tool for the job.
I need to change the delimiter character in a CSV file from ',' to '|'
whenever it appears between two digits, and not if the subsequent character
is a space or letter. I _think_ that I have the pattern properly expressed,
but I fail to get the single substitution of a '|' for a comma within the
run of digits.
In English, I want to locate one or more digits followed by a comma and
one or more digits, then replace only the comma with a pipe. What I've
tried include:
s/.*[0-9],[[0-9]/\&|/g
but this puts the entire pattern string in the output followed by a pipe. My
lack of regex knowledge on the substitution using part of the pattern
hinders me in emacs and grep, too.
Clues needed.
Rich
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug