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 |
how to sort the content of the file based on numeric values
what is the default signal kill in unix?
What is file system in unix??
distinguish between interrupts and exceptions?
the difference between a soft link and a hard link?
which script will invoke first ,when /etc/init.d starts
what is the difference between SED and GREP ? Which one is more better and why?
distinguish between multi-tasking,multi-user,multi- processing and time sharing?
7 Answers Alcatel, Cisco, Infosys, University Exams,
What is grep command in unix with examples?
How can you change the owner or group of a file?
What is the general format of unix command syntax?
How do I search for text in vi?