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 use of "grep" command?
What is awk good for?
How can i know my Filesystem and its current usage in my prod UNIX system?
What is pipe command in unix?
How do I search a whole word in vim?
How to add content of one file into another file at the beginning
in a growing log file how will you see the 1st 99 lines?
What is the command to compare two files in unix?
How i'll delete a particular line from the file? Please give answer as soon as possible. Thanks in advance.
What is the command to find hidden files in the current directory?
The rm command removes links to file. What does this mean? How then is a file deleted from the file system?
How do I delete files from command prompt?