Here is the problem:
I have a Text file with several hundreds of lines and I want to store line 100 to 200 in another text file. I wrote the following piece of code but result is all of the lines not just the ones that I need.
#!/bin/bash echo enter file name read fname exec<$fname a=0 while read line do if test "$line" -gt 100 && "$line" -lt 200 then a=$line echo "$a" break fi done <$fname
any suggestion is very much appreciated.