Given a file find the count of lines containing the word "abc".



Given a file find the count of lines containing the word "abc"...

Answer / Sabhajeet Sonkar

You can use the 'grep' command to find the number of lines containing the word 'abc' in a file. Here's an example:nn```bashngrep -c 'abc' filename```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

How to create environment variables?What are the conditions for creating variables?

1 Answers   Infosys, Wipro,


What is path in shell script?

1 Answers  


what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?

1 Answers  


What are script files?

1 Answers  


How do I save a powershell script?

1 Answers  


How do you create a shortcut in linux?

1 Answers  


What is the syntax of "expr" command?

2 Answers  


write a shell program to check wheather a given string is pallindrome or not?

4 Answers  


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1 Answers   Tech Mahindra,


What is a shell made of?

1 Answers  


What is the use of "shift" command in passing parameters?

1 Answers  


When we login into our account which files are executed?

3 Answers   Chip Quest,


Categories