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



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

Answer / sukumar

grep "???" <fileName>

Is This Answer Correct ?    3 Yes 9 No

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

Answer / giridhar tarare

grep -b "abc" <file_name>

Is This Answer Correct ?    2 Yes 10 No

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

Answer / sudhir kumar

sorry the command will be like below..

grep -x "abc" <file_name>

Regards,
Sudhir Kumar

Is This Answer Correct ?    6 Yes 17 No

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

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

More Unix Commands Interview Questions

Who command in unix operating system?

0 Answers  


What command will change your prompt to myprompt?

0 Answers  


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<stdlib.h> # include <stdio.h> 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:

0 Answers  


How to create hardlinks and softlinks on files?

2 Answers  


How to find $ai_serual resolved path by using unix

0 Answers  






What does the “echo” command do?

0 Answers  


What is command substitution?

0 Answers  


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)?

0 Answers  


what is the difference between KILL and KILL -9?

5 Answers   Informatica, Nutanix,


Give two UNIX kernel parameters that effect an Oracle install

3 Answers   Oracle,


What is the use of sed command in unix?

0 Answers  


What is grep and sed command?

1 Answers  


Categories