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 |
distinguish between user mode and kernel mode?
What does the command '$ls | wc –l > file1' do?
How to display a file name which has zero bytes in size.
what these two commands prints "echo test","cat test"?
How do you execute a UNIX command in the background?
If we want to see first 35 lines of a file which command we have to use?
can we use cat command as an editor ..???
Which command is used to copy files?
How can you copy files or directories?
to list a particular line in the file
what does the command 'wc' do?
if we create a file, in that 10 rows(means 1,2,....9,10 like). i want 7 row exactly, which command use in unix? plz send this question.