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

Which command is used to create a directory?

569


What is the functionality of a top command?

623


What is the first character of the output in ls l command?

629


What is the general format of unix command syntax?

688


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

687






Explain ‘library functions’ with respect to unix commands?

601


What do know about tee command?

601


Explain command to view process running?

611


What do know about tee command and its usage?

584


Describe the zip/unzip command using gzip.

608


Is it inbetween or in between?

578


What are file commands?

648


Who invented grep?

649


Explain ‘system calls’ with respect to unix commands?

598


How does the system know where one command ends and another begins?

1574