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 |
Write a command that will output the sorted contents of a file named in.txt and place the output in another file named out.txt, while at the same time excluding duplicate entries.
How to view the hidden files in /etc directory?
How do I clear my terminal history?
How to set sticky bit, or it have any seperate directory to create sticky bit in sunfir servers. Please help me , i don't no the exact answer?
How do I search for text in vi?
distinguish between user mode and kernel mode?
how to find largest file?
14 Answers HCL, Microsoft, Thomson Reuters,
How to add content of one file into another file at the beginning
in UNIX,what is the command to remove directory with files?
Explain how to use grep command to list find the records of a file containing 10 different strings?
Explain ‘system calls’ with respect to unix commands?
what is kernel?