to list a particular line in the file
Answers were Sorted based on User's Feedback
Answer / jam
To print a specific line without using a string.
sed -n '1p' <filename>
Where 1 is teh line number
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / deepak
grep -i " give_the search keyword here" (specify the directory location/file to search)
| Is This Answer Correct ? | 3 Yes | 2 No |
sed -n '1p' <filename>
head -n filename | tail -1
(change n as per your requirements)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ranjitha
using head and tail command we can print the required line
as an output.
| Is This Answer Correct ? | 2 Yes | 7 No |
What is the protocol for PING command?
What Command is used to make a directory?
what is the command to list files in a directory in UNIX?
How we will execute previous command in vi editor?
how will u execute a file in unix
What UNIX command will control the default file permissions when files are created?
fork in unix ?
How do I run a bash script?
What does the md command do?
what is the difference between "cron" command and "at" command?
What is the use of pipes?
how to delete entire records in unix ?