As other posters imply, what is the response to typing this command at the same place where you might execute the script? The error message implies that the response is not a number.
Quote:
awk 'END {print NR}' ecoli_operons
Knowing the Operating System and version would help.
Clutching at straws and if the above command does not give an error message.
1) The environment variable $LINES is reserved in all modern shells. Though I have no factual reason to suggest this, you could try another name for the variable $lines.
2) A script edited on a MSDOS and ported to unix without proper text file conversion could misbehave like this.
3) The trailing semi-colon on "while [ $lines -gt 0 ];" is surplus.
4) How big is the file? Is $lines a very large number (> 2x1024x1024x1024) ?