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 do know about tee command?

1222


Which unix command lists files/folders in alphabetical order?

1852


What is the general format of unix command syntax?

2029


What does #!/ Bin sh do?

1115


What is the difference between awk and grep?

1334


Explain command to show the space allocation of files?

1170


What is a bash command?

1240


Describe the zip/unzip command using gzip.

1226


What are file commands?

1288


What are reported commands?

1193


Which command is used to find whether the system is 32 bit or 64 bit?

1199


What is unix command?

1320


How do you grep recursively?

1154


How do I search a whole word in vim?

1222


What is the use of tee command?

1239