answersLogoWhite

0


Best Answer

You don't need a shell script to do this; use the 'grep' command with the '-c' option to count the number of occurrences of some pattern.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a shell script to count the number of times is appears in a given text file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How many 1 are there in digits from 1 to 100?

Write out the numbers 1 to 100. Count the number of times 1 appears.


What is the tenth number that appears in both the count on in 4 and 6 sequence?

120


How to write repeated multiplication of a factor by using an exponent?

To write repeated multiplication in an exponential notation, you should write the number that has to be multiplied as the base. Count the number of times that the number is used.


It 4-1 solved question papers November -2008?

Write a program to count the number of IS in any number in register B and put the count in R5.


Write a C programme to count the number of vowals present in your name?

abhimanyu


How do you write the number of shaded parts and the fraction of the whole that is shaded?

Count how many parts there are in total (both shaded and unshaded) and write this as the denominator (bottom number) of the fraction. Count how many shaded parts there are and write this as the numerator (top number) of the fraction. You now have the fraction of the whole that is shaded.


How many times does the number 1 appear between 10 and 99?

If you count 11 as 2 instances, the digit 1 appears 18 times if you don't count 10, 19 times if you do. 10,11,12,13,14,15,16,17,18,19,21,31,41,51,61,71,81,91


Write a program to get table of a number?

#include "stdio.h" #include "conio.h" #define TABLE_UP_TO_20 20 void table_of_a_number(int number); int main() { int i = 0x00; printf("Enter a positive number in decimal whose table has to be generated"); scanf("%d",&i); table_of_a_number(i); return 0; } void table_of_a_number(int number) { int count = 0x00; for(count = 0x01;count <=TABLE_UP_TO_20 ;count++) { /* THis will print the table*/ printf(" %d * %d = %d\n", number,count, (number*count)); }


Write a program that ask the user to enter a number n and display the first n even numbers?

#include "stdio.h" int main() { unsigned int number, count; printf("Enter the Number \t"); scanf("%d", &number); printf("The even numbers are: \n"); for(count = 0x01; (count < number && number!= 0x00)) { if(count%2) { }else { printf("%d\n", count); } count++; } return 0; }


How do you write 160000 in exponential form?

To find the exponent count the number of places from the decimal to the end of the number. This will let you write the number in exponential form or in scientific notation160000=1.6 x 105


How do you work out- find the proportion of the shaded squares write as a fraction?

-- Look at the picture, count how many squares are shaded, write down the number. -- Look at the picture again, count how many squares there are all together, whether they're shaded or not shaded. Write down the number. -- Make a fraction. Put the first number on top, put the second number on the bottom. (-- Reduce the fraction to lowest terms, it necessary, and if you know how to do that.)


If you count from one to hundred how many 6 will you pass on the way?

The number 6 appears 20 times when counting from one to one hundred.