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
Write a command that will display files in the current directory, in a colored, long format.
Which unix command lists files/folders in alphabetical order?
What does the command ' $who | sort –logfile > newfile' do?
What happens when we execute a unix command?
What is command statement?
What do chgrp command do?
Why is awk called awk?
When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system.
How can i findthe right soluion???
My pgm:
#include
hw will u use awk in replacing cahrs and files
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
What command is used to check the current users?
Why is shebang used?
Explain how to use grep command to list find the records of a file containing 10 different strings?
What is the unix command to confirm a remote host is alive or not?
How does pipe () work?