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

grep ^...$ <filename>

Is This Answer Correct ?    61 Yes 8 No

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

Answer / leo

grep ^...$ <filename>

Is This Answer Correct ?    24 Yes 3 No

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

Answer / manoj kumar kar

grep ^...$ <filename>

Is This Answer Correct ?    12 Yes 4 No

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

Answer / usama el far

grep -n root /etc/passwd|cut -f1 -d:

Is This Answer Correct ?    6 Yes 1 No

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

Answer / ramesh

grep "^...$" <file name>

Is This Answer Correct ?    4 Yes 1 No

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

Answer / khushi

grep '\<...\>' filename

Is This Answer Correct ?    4 Yes 1 No

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

Answer / rajasekar utl

grep ^...$ <filename>

Is This Answer Correct ?    4 Yes 2 No

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

Answer / saravan

grep -w [a-zA-Z][a-zA-Z][a-zA-Z] <filename>

Is This Answer Correct ?    4 Yes 3 No

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

Answer / satyawan

grep -n '\w{3}' <filename>

Is This Answer Correct ?    2 Yes 1 No

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

Answer / chintalapudi

grep -x '^???$' <filename>

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

Briefly, how do you install Oracle software on UNIX.

2 Answers  


how will you login one server's shell prompt to an another server?

5 Answers   Cosmic Infotech, Perot Systems,


How does one process we can start an executable file? How to get the PID process, which we started?

6 Answers  


what are the uses of filters?

3 Answers  


What do you mean by zambie process?

6 Answers  






in UNIX ,What is the command to view contents of a large error log file?

7 Answers  


How to get the last ten lines of a file using awk utility?

1 Answers   Infosys,


What are the differences among a system call, a library function, and a unix command?

0 Answers  


their is a file1,file2 and i want to append file1 data to file2?

9 Answers   IBM,


what is the command to find out the difference between files and folders?

6 Answers  


What is awk used for?

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  


Categories