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 / deshdeep saxena

awk 'NR==7{print}' filename will give you the seventh line
as output
awk 'NR<=7[print]' filename will give you from 1st line to
the seventh line :-)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the dos commands?

1256


How does shebang work?

1063


How does pipe () work?

1088


What is awk used for?

1126


How do I delete files from command prompt?

1218


How can you see the command line history?

1136


Which command is used to copy files?

1170


What is the command to find maximum memory taking process on the server?

1206


What is the unix command to confirm a remote host is alive or not?

1212


Differentiate cmp command from diff command.

1166


What is the search command in unix?

1085


How do you repeat a command in terminal?

1222


Is it inbetween or in between?

1044


Are you in or at the office?

1123


What does the command ' $who | sort –logfile > newfile' do?

1270