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 |
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?
What is grep in bash?
What does the command '$ls | wc –l > file1' do?
Enlist some filename manipulation commands in unix.
How to view the hidden files in /etc directory?
What is time_t?
what is the default permission for /etc/shadow file in UNIX
describe the escaping sequence characteres in unix
what is the command to print last 8 lines of any text file.
what is the use of nice command?
Through which command will redirect output to bOth screen and files at the same time?
Who command in unix?