Write a grep (or grep) command that selects the lines from
a file that have exactly three characters.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of finger command?

611


How does the system know where one command ends and another begins?

1589


What is s and g in sed command?

572


Enlist some filename manipulation commands in unix.

562


How do you grep recursively?

575






Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

975


What do chmod command do?

612


Which unix command lists files/folders in alphabetical order?

626


What does the “echo” command do?

637


What is the unix command to confirm a remote host is alive or not?

598


What is the functionality of a top command?

632


Why is it called grep?

573


How to use grep command to list find the records of a file containing 10 different strings?

658


Is grep faster than awk?

580


What are file commands?

663