#start code
BEGIN{
filename_counter = 10000;
}
{
if(FNR == 1)
header=$0
else
{
fname=filename_counter".txt"
print header > fname
print $0 >> fname
filename_counter++
}
}
#end Code
copy the above code and save as split_file.awk.
Run the script as below.
nawk -f split_file.awk file1