Add two delimiters after every sixth comma
Add two delimiters after every sixth comma I’m trying to expand on this question but can’t figure out this issue: Let’s say I’ve got a file roll.txt: echo "’123456789′,’987651234′,’129873645′,’213456789′,’987612345′,’543216789′,’432156789′,’876543291′,’213465789′,’542637819′,’123456′,’23456′,’22234′,’3456′,’7890543′,’34567891,’2345′,’567’" >> roll.txt I can place a newline after every sixth comma with the following sed command: sed ‘s/,/,n/6; P; D’ roll.txt ‘123456789’,’987651234′,’129873645′,’213456789′,’987612345′,’543216789′, ‘432156789’,’876543291′,’213465789′,’542637819′,’123456′,’23456′, ‘22234’,’3456′,’7890543′,’34567891,’2345′,’567′ However, when …