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 |
In UNIX, what is the command to edit contents of the file?
What does the command '$ls | wc –l > file1' do?
Can you write a command to erase all files in the current directory including all its sub-directories?
how will you convert a general file to a hidden file?
can we use cat command as an editor ..???
what is the difference between KILL and KILL -9?
5 Answers Informatica, Nutanix,
what is kernel?
how to sort the content of the file based on numeric values
distinguish between paging and swapping?
How do you create a directory in UNIX?
why metadb requires a seperate slice to create Solaris volume manager
in UNIX,what is the command to remove directory with files?