I want to say output lines 5 - 10 of a file, as arguments passed in.

How could I use head and tail to do this?

where firstline = $2 and lastline = $3 and filename = $1.

Running it should look like this:

./lines.sh filename firstline lastline
Edit
Report