User Tools

Site Tools


howtos:combine_three_lines_into_one

By changing the number “3” to something else you can make combine a different number of lines into one. Here are two examples:

awk 'ORS=NR%3?",":"\n"' 

awk '{if (NR%3) {ORS="";print " "$0} else {ORS="\n";print " "$0}}'
howtos/combine_three_lines_into_one.txt · Last modified: 02/12/2018 20:34 by 127.0.0.1