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

Answer Posted / sudhir

The command will be like this

grep -c "abd" <file_name>

This command gives you the line number which contain three
character.

Regrds,
Sudhir

Is This Answer Correct ?    6 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are bash commands?

606


Write a command to display a file’s contents in various formats?

633


Which command is used to find whether the system is 32 bit or 64 bit?

639


Which command is used to create a directory?

580


Is it inbetween or in between?

592






What are grep patterns?

583


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1771


Is grep faster than awk?

573


Explain mount and unmount command.

627


What are the commands in UNIX to list the files in a Directory?

628


What is the size of time_t?

669


What does find command return in unix?

606


Which command is used to copy files?

568


How do I clear my terminal history?

592


What happens when we execute a unix command?

608