Creating a unix shell script

Assignment Help Data Structure & Algorithms
Reference no: EM1380536

Question: Design a Unix shell script that searches for a text document with most occurrences of a given keyword. For instance, if I would like to search for a script with most usages of if statement, I would execute:

find_most_relevant.sh /home/student/myscripts if

The script find_most_relevant.sh should take two arguments. The first one is the directory where text files are located. The second argument is a keyword. The output of the script should either state:

No file with word <keyword> found in the directory <directory-name>

Or

file <filename>: found X occurrences of word <keyword>

(for the file with most occurrences of keyword only)

 

Reference no: EM1380536

Questions Cloud

How does goal setting disturb the performance : How does goal setting disturb the performance of the player on the Colts team? How do you ponder the Colts players would rate their job satisfaction? Why is this significant to the performance of the team as a whole?
Illustrate what would you recommend that they do. : WLAN worked well for one semester, but now more students have laptops with Wi-Fi built in also performance has deteriorated significantly. Illustrate what would you recommend that they do. Be sure to support your recommendations.
What is your dint of bernstein''s perception on raising : David Bernstein wants help financing his Lodi, New Jersey based Access Direct Inc., a six-year-old $3.5 million company. We're set to get to the next level
Explain why you believe author demonstrates good critical : Explain why you believe author demonstrates good critical thinking also whether article meets criteria as explained in Cornell University site.
Creating a unix shell script : Design a Unix shell script that searches for a text document with most occurrences of a given keyword. For instance, if I would like to search for a script with most usages of if statement,
Detailing the antitrust claims faced by the microsoft : Prepare a two to three page paper subsequent the APA guidelines detailing the antitrust claims faced by the Microsoft Corporation as thorough in the above websites
Illustrate what must carter prove to establish a rebuttable : Carter brings suit against Harper also Jennings alleging disparate treatment discrimination. Illustrate what must Carter prove to establish a rebuttable presumption of disparate treatment. If Carter establishes rebuttable presumption, does Harper ..
Is organization more appropriately illustrated as centralize : Is organization more appropriately illustrated as centralized or decentralized also Explain why.
Leadership via vision is essential for success : Leadership via vision is essential for success. Deliberate in detail research the topic the qualities that a leader should exhibit in order to be considered visionary and further

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Different applications of data structure

What are the different applications of Data Structure

  Create a binary search tree program

Creating a Binary Search Tree program - Finding the largest and smallest values in the tree Add two class methods

  Questionm about distributed database

Explain what a distributed database is and how replication works with respect to managing the information in these databases.

  Write an algorithm to count nodes in a linked list

storage pool and that there is a special null value. Write an algorithm to count the nodes in a linked list with first node pointed to by first."

  Calculate failure and success ratios using fifo page removal

Using FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). Then calculate the failure and success ratios.

  Encryption feistel cipher and decryption algorithm

If this is psudocode for encryption feistel cipher determine decryption algorithm?Output: ciphertext = (left[16], right[16]) Explain pseudo-code of corresponding decryption algorithm for this cipher.

  Calculate the size of the state space as a function of n

n vehicles occupy squares (1, 1) through ( n , 1) (i.e., the bottom row) of an n × n grid. The vehicles must be moved to the top row but in reverse order

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  What do you meant by an rfp

Select a specific category of vertical applications to investigate. Use the Internet and any other sources of information you might have to study some of the different products that are available in that category.

  Create algorithm which will prompt for-accept four numbers

Create an algorithm which will prompt for and accept four numbers, sort them into ascending sequence and display them to the screen. Your algorithm is to include a module

  Relationships in a database model

Discuss different types of classifications and do they overlap, or do they each tell us something unique about the entity relationship?

  Determining worst-case time complexity

The recent discovery of the following fragment of uncommented procedural C code in the Sunlab has caused a big scandal. What is the worst-case time complexity of foo(a,1,N,k), and for which inputsdoes it occur?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd