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

Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

1176


Are you in or at the office?

1098


What does the metacharacter mean?

1104


What is the pipe command?

1149


what is the advaantage of each user having its own copy of the shell?

2524


What is the size of time_t?

1180


What are the unix commands?

1055


What is the use of awk command in unix?

1090


Explain command to display different lines that are found when compare two files?

1133


What are grep patterns?

1045


What is the difference between cat command and more command?

1153


What is the use of egrep command in unix?

1146


What is the behavioural difference between cmp and diff commands?

1241


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

1099


What do chmod command do?

1158