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 does the command 'wc' do?
What are the unix commands?
what is the use of ls -l command & what is the information it gives about user ?
How would you find the size of a file or directory?
What does the command '$ls | wc –l > file1' do?
What is time_t?
What is the comma to show the space allocation of files?
What is the functionality of a top command?
Explain iostat, vmstat and netstat.
What does sed command do in unix?
What does the metacharacter mean?
What is awk command used for?