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 / niranjan

To display first 7 lines of file:-

1) head -7 filename

2) cat filename|head -7



To display only 7th line of file:-

1) head -7 filename|tail -1

2) cat filename|head -7|tail -1

3) tail +7 filename|head -1

choice is ur's..Which one u feel looks gud...:):):)

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 “chmod” command?

1193


What is the general format of unix command syntax?

1957


What is unix command line?

1272


What is in grep command?

1181


What does 'mkdir' command do in UNIX?

1322


How do I open a port?

1104


What is the function of grep command in unix?

1191


Who invented grep?

1176


What is grep command in unix with examples?

1233


What is the behavioural difference between cmp and diff commands?

1297


What does the md command do?

1162


Who wrote grep?

1076


Which command is used to create a directory?

1179


Explain ‘system calls’ with respect to unix commands?

1106


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

1256