1. This command helps to find the count of lines containing word "EFG":
grep -c EFG 'file name'
in general, the command is: grep -c 'string to be searched'
'file name to be searched'
2. Shell programming/scripting should not be used when:
-the task is very much complex
-productivity expected is too high
-it involves various softwares.
Given a file find the count of lines containing word "EFG". When should shell programming/scripting not...
12.13 (Count characters, words, and lines in a file) Write a program that will count the number of characters, words, and lines in a file. Words are separated by whitespace characters. The file name should be passed as a command-line argument, as shown in Figure 12.13 D Command Prompt exercise java Exercise12.13 Loan.java ile Loan.jaua has 1919 characters 10 words 71 lines lexercise Figure 12.13 The program displays the number of characters, words, and lines in the given file. This...
Word count. A common utility on Unix/Linux systems. This program counts the number of lines, words (strings of characters separated by blanks or new lines), and characters in a file (not including blank spaces between words). Write your own version of this program. You will need to create a text file with a number of lines/sentences. The program should accept a filename (of your text file) from the user and then print three numbers: The count of lines/sentences The count...
this is bash scripting. a. When a file is created on Linux Operating System, What are the default permissions of the file? b. Write a command to find the total disk space used by a specific user on linux system? c. what is "s" permission bit in a file?
Python Programming Write a program that counts how often a word occurs in a text file. Input: Ask the user for the name of an ASCII text file. Output: Display the numbers of top frequently appeared words and their frequencies. Pseudocode: 1) Read the file 2) Split the file into words 3) Count each word 4) Sort the words by frequencies, starting with the most frequent ones 5) Internally you should use some sort of data structure to keep track...
CSC110
Lab 6 (ALL CODING IN JAVA)
Problem: A text file contains a paragraph. You are to read the
contents of the file, store the UNIQUEwords and count the
occurrences of each unique word. When the file is completely read,
write the words and the number of occurrences to a text file. The
output should be the words in ALPHABETICAL order along with the
number of times they occur and the number of syllables. Then write
the following statistics to...
This is a C programming question. We have a file containing floating point numbers (we don't know how many). Write a complete C program that alternately averages only the floating point numbers (for example 3.50, 12.507, 123.60,5.98 would lead to the result (12.507+5.98)/2), ignore the whole numbers. Use file input, assuming the file is named "numbers.data". The program should be compatible with files that contain several numbers on separate lines.
linux help
Create a file called trees, containing the following individual lines: Oak tree Pine Tree Spruce tree Cottonwood Maple tree Pine Tree Copy in the contents of the trees to more_trees file. Next, add the following trees at the end of the list. Redwood Willow tree Use a command to compare the trees and more_trees files and show the differences in terms of individual lines that differ. Determine the number of bytes in both the trees and more trees...
using MATLAB
Function Name: hahaYes Inputs: 1. 2. (char) The filename of an Excel file containing word counts from various works (cell) A 2xN cell array of words and how many times they occur in the unknown work Outputs: 1. (cell) A 1x3 vector of the closest matches to the unknown work Background You do not understand this reference Function Description: The Excel file that you are given contains data on how many times certain words appear in different works...
Pig Latin Translator in Java The goal here is to read in the characters stored in a text file and create a second text file that contains the original text but with every word converted to “Pig-Latin.” The rules used by Pig Latin are as follows: • If a word begins with a vowel, just as "yay" to the end. For example, "out" is translated into "outyay". • If it begins with a consonant, then we take all consonants before...
Implementation of a MapReduce-style distributed word count application For this assignment, you can use any programming language you want and you can use either RMI or any version of RPC for client/server communication. For this assignment, you will focus only on a single type of application; Word Count. In a single Word Count job, the programmer provides a set of text files to be processed, and the frequency of each word in all the documents is counted and stored in...