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...

A file has 1000 lines and i want to display only 1st line
how to do it?
pls ..tel me

Answer Posted / radhakant kumar

awk '{if(NR==1) print $0}' filename

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I open a port?

1142


What is sed awk grep?

1187


What is $0 bash?

1255


Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

1268


Can you enlist some commonly used network commands?

1158


Is grep faster than awk?

1085


What command will change your prompt to myprompt?

1386


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

1327


What is grep and how do you use it?

1175


What is ctrl d?

1157


What does pipe () return?

1128


How do you repeat a command in terminal?

1293


What is the difference between cat command and more command?

1272


What is difference between grep and find command in unix?

1276


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

2614