Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

if we create a file, in that 10 rows(means 1,2,....9,10
like). i want 7 row exactly, which command use in unix?
plz send this question.

Answer Posted / manu

if you want 1 to 7 row then
head -7 filename
if you want only 7th row exactly then
head -7 filename|tail -1
or
tail +7 filename|head -1
or
cat -n filename|grep '^7' filename

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is grep in bash?

1012


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

1144


why metadb requires a seperate slice to create Solaris volume manager

3084


How do I clear my terminal history?

1093


How do I search a whole word in vim?

1129


What does the metacharacter mean?

1092


Which command is used to restrict incoming messages?

1046


What is awk command used for?

1130


Is command prompt unix?

1101


What is the nmap command?

1124


What does the command '$ls | wc –l > file1' do?

1176


What does grep v do?

1004


What is sed awk grep?

1074


What does sed command do in unix?

1120


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

1339