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 |
boot process?
How do I use grep to search for a file?
How do you find which version and name of unix you are using at the command prompt?
how to check a file system type
What will the following command do?
How i'll delete a particular line from the file? Please give answer as soon as possible. Thanks in advance.
Write a command to find all of the files which have been accessed within the last 30 days.
5 Answers Google, IBM, Satyam,
Name the various commands that are used for the user information in unix.
What command will change your prompt to myprompt?
In Unix file permissions what does the second field denotes?
What is the behavioural difference between cmp and diff commands?
What is ‘ps’ command for?