Write a grep (or grep) command that selects the lines from
a file that have exactly three characters.
Answers were Sorted based on User's Feedback
Answer / saravan
Sorry use the below commands to get the exact word contains
3 char in the file.
grep -w "[a-zA-Z][a-zA-Z][a-zA-Z]" <filename>
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / jyoti pruthi
grep -n "..." <filename>
It will give u the lines that have only 3 characters with
line numbers. Here, "..." replace any 3 characters (single
dot represent single character).
| Is This Answer Correct ? | 0 Yes | 1 No |
What is an Environment Variable?
How to see unused port number in Solaris?
How can you create a symbolic link to a file or directory?
How to add content of one file into another file at the beginning
what is the shell for dos,nt operating systems?
How to know a process is a zombie or orphan process?
how many types of file in unix?
34 Answers MNC, TCS,
What difference between cmp and diff commands?
How do you know about running processes of a particular user?
What is the use of egrep command in unix?
to list a particular line in the file
What do chgrp command do?