Assignment title: Information
this is my assignment plz help me to complete it. Do not submit shellscripts, in particular, as MS-Word documents.
You are welcome to undertake the project on your home or laptop computers. Please note, however, that all submitted materials will be marked on a CSSE computer running RedHat Linux, so please test your own work on a CSSE Linux computer before submission.
New ideas?
Depending on what additional materials you've been reading, two new(?) concepts may help you for this assignment:
a shellscript is simply a text file containing one or more shell commands. When a shellscript is executed, by providing the name of the text file anywhere you'd provide a command name, the contents of the file are read and executed by a new instance of your shell. You can thus employ a shellscript to conveniently record frequently used commands, and save yourself some typing.
You may create and run a shellscript using this sequence of commands:
prompt> create or edit a text file, containing your required commands
prompt> chmod +x myscript # make the shellscript executable
prompt> ./myscript # run the shellscript
It's very good practice to include some comments in programs and shellscripts, to explain the author's design and logic. In particular, include your name and student number in a comment near the top of each shellscript you write.
a pipeline is simply a sequence of commands, executed left-to-right, in which the shell arranges for the output of the left-hand command to be provided as input to the right-hand command. We often describe the right-hand command as a filter of its input, as it typically modifies, reduces, or rearranges the output of the left-hand command.
We simply use the pipe symbol to connect the commands:
prompt> left-hand-command [options] | right-hand-commands [options]
Tasks
[4 marks]
Historically, the standard command for listing files, ls, did not provide facility to sort files by their size (in bytes). More recently, the ls command has received a new -S switch to sort files by size.
Without using the new -S switch, develop a command pipeline to list files, sorted by their size.
[4 marks]
When sorting a text file containing both a header-line and data in multiple columns, we must be careful to not sort the header-line, too, else the header-line may end up in the "middle" of the lines of data.
Consider the text file australian-universities.txt
If we just sort it by either its 1st field (state name), then the initial header line will be incorrectly positioned in the middle of the output.
Write a shellscript to sort text file, australian-universities.txt by the number of its international students, while keeping the header-line at the top of the output.
[4 marks]
Using a file of simple text to provide the input data, develop a command or shellscript to uniquely list all words found in the file (list each unique word once).
We'll define a "word" to be any sequence of one-or-more alphabetic characters, the words "Hello" and "hello" are distinct words, and all other non-alphabetic characters should be ignored.
[8 marks]
Consider the following webpage: Perth, Western Australia February 2017 Daily Weather Observations which presents a number of weather observations from February. That webpage is written and presented in HTML (as you can guess from its use of fonts and colours), but HTML can be difficult to process using simple command scripts. Of greater interest to us are text-only equivalents providing the raw-data, here: February 2017 and February 2016.
We've been told that the weather for February 2017 was more extreme than for February 2016 (in fact, that a number of records were broken).
Based on your own definitions, write a shellscript to determine which corresponding weather observations in 2017 were more extreme than those in 2016.