Get specified line as output from a file

hi all,
One simple question. How to print a perticular line from a file.

For example if a file "test" has some list of commands as below

ls
chfn
cut
grep
...
...
...

now i have to print 3 rd line of it i.e expected output is to be"cut"..

Can you please help me ...

Thankls in advance,
Chanakya

sed -n '4q;3p' test

Thanks Vino but can u just explain me if i have to take input from user

I think the solution vino has given is perfect.if you really know the line number then put that line no just before p and line no+1 just before q.
like
sed -n '4q;3p' test.txt

that sounds strange requirement, i guess u r trying to run that command if so
run below script if you just want to print that line replace exec $line with echo "$line".
But i think sed solution is superior.

echo "enter line no"
read x

count=1

while read line
do
if [ $count -eq $x ]
then
exec $line
exit 0
fi
count=`expr $count + 1`
done <test.txt

Hi,
Solution with awk

pass the line to print as a parameter to the script

Gaurav

thank you friends...