|The goal of this assignment is to assess your understanding of the use of the shell and open-source tools to effectively filter and process textfiles and streams of text. You will be assessed on the clarity and quality of your shellscripts to examine and report on the data. While the efficiency of your shellscript will not be assessed, you should take care to avoid any excessive slow practices.|
datecommand may be used to report dates and times in a number of formats. By default, it reports the current date and time.
Write a shellscript which accepts two command-line arguments each of the form DD/MM/YYYY, such as 25/12/2020, and reports the number of days between the two dates. Successive dates are considered to be one day apart. A helper.
$RANDOM environment variable,
write a shellscript to print the numbers on a valid Saturday Lotto ticket
in numeric order. For example:
<Linux> is a popular operating system
Companies use <open source> software.
The purpose of identifying specific words and phrases this way, is so that we may generate an index for the book. The textfile does not contain the index itself, but a shellscript will generate the index. At most one bracketed word or phrase appears on each line, but each bracketed word or phrase may appear multiple times in the file.
Develop a shellscript to generate a book's index. The name of the book's textfile is passed as a command-line argument to the script, and the script's output will consist of the index items, and the line-number(s) on which they appear.
A sample execution and its (possible) output appears below. Simply create your own textfile(s) for testing, but no need to submit them.
The second field of the dataset reports the fate of each passenger after the shipwreck - 0 signifies that they did not survive. We will make the (unrealistic) assumption that all passengers with the same surname were from the same family, and we'll define a family to comprise two or more people.
Develop a shellscript which reports the surnames of the whole families that survived the shipwreck.
Good luck. Chris McDonald