Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] Scripting in bash


I know that this is a very easy problem for most of yo, but I have never really tried to do this before. Showing my ignorance of the basics again!!!
Can you use head inside a simple script to pick out a particular line in a text file and then pipe it to a file - say:
By invoking    fline 15 file.txt  (where fline is the script below - only relevant line?)
#! /bin/sh
.
.
head $1 $2 | tee fred.txt
.
.
 
I have looked around and failed to find the relevant info. I think that this should send the first 15 lines to the file fred.txt, but how do I just send the nth line to the file?
 
Stay well and happy
Heracles