The action to take when the condition is true is omitted and by default implies that $0 is printed. Longer form, which might be more understandable, would be:
awk '
NR >= $start_line && NR <= 3 {
print;
}' master_scriptlist.txt > $driver1/scriptlist.txt
@rdcwayx -- I'm with you on that 100%. Stitching together quoted segments to incorporate shell variables will end badly at some point in time.
I know that, I am just wondering how the code works while the "$start_line" variable is inserted directly into the awk code, I think this is undefined, and the code does not work here.
Yea, it is much better to use -v option, I learned something, thank you.
I see what you are saying (in addition to the typo that I cut/pasted into my example). It's possible that awk is interpreting $start_line as 0, which would always be true, but I cannot reproduce it, so I'm not sure.