<!-- 
.. title: Select lines
.. slug: select-lines
.. date: 2008-09-08 20:36:46 UTC+01:00 
.. tags: mathematics, 
.. link: 
.. description: 
.. type: text 
--> 

The script described just [below](poor-mans-integrate.html) always integrates the whole spectrum. What if you want to select a part of it? The easiest way to select a certain number of lines in a file is this one:

	head -n $last_line $filename | tail -n $nr_of_lines

Note that

	nr_of_lines=$(($last_line-$first_line+1))

