Hi,
I need to break an input file into multiple output files. The number of output files is decided by a maximum record count allowed for each file.
Hence I am using the nawk command to recursively retrieve a range of lines from an input file and write them to output files. But I am unable to use variables for the range to be provided against NR.
cat file.input.XYZ.dat | nawk -F\n '(NR>0 && NR<=10) {print $0}' | tee -a result_tmp.txt
The above works but I need to use $LOWER_LIMIT and $UPPER_LIMIT in the places of 0 and 10.