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 the comma to display different lines that are found when compare two files?

1247


What are file commands?

1291


What is the command to find hidden files in the current directory?

1236


What are the unix commands?

1157


Explain how to use grep command to list find the records of a file containing 10 different strings?

1127


What does this command do,"$more readme.txt“?

1211


Who invented grep?

1213


What is the difference between cat and more command?

1366


Which command is used to create a directory?

1230


Name the general commands in using unix os for a beginner?

1220


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

1451


Why is grep called grep?

1365


Write a command that will display files in the current directory, in a colored, long format.

1276


How does pipe () work?

1148


Explain ‘library functions’ with respect to unix commands?

1217