Good day to all,
I was wondering how to split a file based on the quantity of number lines, this number passed as variable and each part has the same size (same line numbers), and each part save it into a file.
This is what I have tried:
awk -v var="$1" ' FNR==var {close("Partfile"f);f++}{print $0 > "Partfile"f}' datafile
Thanks in advance for any clue