Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help4407


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).
 
Options:
RSS cloud
Jump to:

There are 154 articles from this person

154 of 390 articles shown, currently no other people reading this forum.

UWA week 26 - mid-year break

photo Assignment results and feedback now available in csmarks
Thu 25th Jun 2020, 11:53am, Christopher M.
Hello Everyone, Assignment results and feedback are now all available via csmarks: https://secure.csse.uwa.edu.au/run/csmarks Congratulations to the 31 students (of our 101) receiving full marks for the assignment. If you have any concerns or questions...

UWA week 24 - 1st semester, 1st exam week

photo Re: Final Exam (all 5)
Fri 12th Jun 2020, 12:57pm, Christopher M.
Yes, though your answer also needs to be based on some facts (i.e. not just opinions if they're not true). Your answer should be structured, to the extent that you're presenting a logical argument that is easy to follow. It doesn't have to be an excellent...
photo Re: Final Exam (all 5)
Fri 12th Jun 2020, 4:07am, Christopher M.
Hi Mingbo, I'm unsure what distinction you're making between 'memorize' and 'understand'. Certainly there are no questions in the exam that can be answered by rote learning the material. All of the questions ask you to describe the role, purpose, design,...
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Fri 12th Jun 2020, 3:51am, Christopher M.
Hi Lee, Unsure exactly what you're trying to do, but this may help: https://askubuntu.com/questions/47642/how-to-start-a-gui-software-on-a-remote-linux-pc-via-ssh
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Wed 10th Jun 2020, 3:28pm, Christopher M.
I hadn't seen them before, but that webpage provides the source code of some of those external commands. All in C, but they reveal how it all worked. When one (parent) process spawns another (child) process, both continue their execution, unless one blocks...
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Wed 10th Jun 2020, 4:12am, Christopher M.
Indeed; just checking to see if anyone was reading it :-)
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Wed 10th Jun 2020, 4:11am, Christopher M.
Today, 'cd' has to be internal to the shell, so that it can change the shell (process's) environment. Today's there no way for one process (such as child of a shell) to change the environment of another process - an external 'cd' command could change...
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Tue 9th Jun 2020, 5:15pm, Christopher M.
On my Ubuntu Linux system, the commands [ and test both exists (now) in /usr/bin, but are not links to each other (and different sizes). Interestingly 'man test' provides the online documentation for both. On macOS /bin/[ and /bin/test are the same...
photo Re: Questions and Clarifications for Final Exam (all 9)
Tue 9th Jun 2020, 5:02pm, Christopher M.
Hi Lee, No, no expectation to write more, just because we're typing. If you were on campus, writing your answers in the standard UWA exam booklets, then (most students) would answer a 10-mark question on 2-3 pages of the booklet, producing reasonable answers...
photo Re: Bash vs Other Programming Languages (eg Python or C) (all 4)
Tue 9th Jun 2020, 4:50pm, Christopher M.
A great question Kerrie; and thanks to Lee and David for their viewpoints - all correct, because there's no single one-size-fits-all solution or language for the majority of computing tasks. As David stated, it's not reasonable to compare what we've completed...
photo Re: Questions and Clarifications for Final Exam (all 9)
Mon 8th Jun 2020, 11:36am, Christopher M.
Yes, you may use blank paper to plan your answers (somewhere UWA has redefined closed-book exams as permitting paper for taking notes). Yes; focussing on my 3rd year unit which has their exam tomorrow, but am planning on returning all assignment marks...

UWA week 23 - 1st semester, study break

photo Re: recording problem of 8th May and week 11 (both)
Fri 5th Jun 2020, 11:15am, Christopher M.
That is exactly what it was like - it was a lab session (not a lecture), requested by a student who could not attend; there was a small amount of discussion, early, but that's it. It is now there.
photo Final exam consultation times
Thu 4th Jun 2020, 10:23am, Christopher M.
Hello Everyone, I've set up some Exam consultation times (URL on unit webpage): - Thursday 4th June 2pm-4pm - Wednesday 10th June 3pm-5pm - Friday 12th June 1pm-3pm and you may still ask questions (and offer answers) on this help forum, though my response...
photo Re: Questions and Clarifications for Final Exam (all 9)
Thu 4th Jun 2020, 8:09am, Christopher M.
The exam password will be on LMS (not our unit's webpage). (I have had nothing to do with the setting up or running of our Examplify exam, other than just preparing the exam's questions in the required format)
photo Re: Questions and Clarifications for Final Exam (all 9)
Wed 3rd Jun 2020, 5:19pm, Christopher M.
Hello, I agree with your statements (though I wouldn't describe anything in this unit as involving any theory). However, I didn't see a question asked in your post.
photo Re: Exam info (both)
Wed 3rd Jun 2020, 5:18pm, Christopher M.
Hello Gus, Weeks 1-11 are assessed; I can see the standard descriptions on the Schedule page for all weeks. The lecture recordings for each of weeks 1-10 (not 4) are available via LMS, and the recording for week-11 (a summary lecture) will be posted there...
photo Re: Returning Multiple Values: string manipulation vs global variables vs alternatives. (all 6)
Mon 1st Jun 2020, 11:15am, Christopher M.
Yes, usually external processes involve forking to get a new child process. In some cases, the shell can determine if a subshell really needs a new process, and so there may not be a fork in all cases.

UWA week 22 - 1st semester, week 12

photo Re: Exercise 5 Solutions for Question 4 (both)
Sun 31st May 2020, 6:52pm, Christopher M.
Now available from our Schedule page. Good luck.
photo Re: Clarifications for Assignment 2 (all 41)
Thu 28th May 2020, 9:43am, Christopher M.
Thanks David, impressive results. You (everyone) will also note that the first execution of your script will be a bit slower than subsequent executions, as the files are transferred from disk, and copies of them retained in faster cache memory. Using an...
photo Re: Assignment 2 q1 (all 16)
Thu 28th May 2020, 9:39am, Christopher M.
From the command-line, you do not run either of those. You need a new target inside your Makefile, so that you can run: make updateversion Your Makefile will already need to know which project (by name) that it can update.
photo Re: The time of releasing mark of Assignment 1 (all 10)
Wed 27th May 2020, 3:44pm, Christopher M.
This semester I've become very bad at estimating how long (this) marking should have taken. I'd dearly have loved to have finished it well before now (about 1/4 to go), and it's the task that I'm fitting in between all my other tasks. Sorry, cannot give...
photo Re: Assignment 2 q1 (all 16)
Wed 27th May 2020, 3:42pm, Christopher M.
Hello Matthew, Your goal is to write a shellscript, that can be invoked by (from within) your Makefile, to update the *.c, *.h, and the Makefile itself. This requirement is very typical - the Makefile (read by the make program) does not, itself, perform...
photo Re: Assign 2, Q3 - Rottnest Express Timetable (both)
Wed 27th May 2020, 3:32pm, Christopher M.
Hi David, Just this part, above, and if they do arrive early enough to catch an earlier ferry, let's assume that they do that.
photo Re: task 2: sample size (all 6)
Wed 27th May 2020, 3:29pm, Christopher M.
OK, glad you found the problem - and a good hint for others to check their input data.
photo Re: Clarifications for Assignment 2 (all 41)
Wed 27th May 2020, 3:15pm, Christopher M.
It does sound slower than anticipated, though the getting it to be super-fast is not a requirement. You may be able to find places where you are invoking some 'expensives' processes like AWK, several thousand times, just to have it perform a single calculation....
photo Re: Lecture / Exam Update (both)
Wed 27th May 2020, 3:01pm, Christopher M.
Hello Matt, Lecture recordings (for weeks 10 and 11) are still coming. Information about the final examination is now available from our unit's front page.
photo Final examination information
Wed 27th May 2020, 1:44pm, Christopher M.
Final examination information is now available from: https://teaching.csse.uwa.edu.au/units/CITS4407/examinations.php
photo Re: Returning Multiple Values: string manipulation vs global variables vs alternatives. (all 6)
Tue 26th May 2020, 5:44pm, Christopher M.
Sounds good. By 'forks involved', do you mean running the external processes, spawned by bash?
photo Re: Clarifications for Assignment 2 (all 41)
Tue 26th May 2020, 5:44pm, Christopher M.
I cannot tell if your script is correct, but your description of its actions meets the requirements. You do not need to submit any data files or HTML (results) files. Your script will be run using some test data, a submit of the large data file you've...
photo Re: Returning Multiple Values: string manipulation vs global variables vs alternatives. (all 6)
Tue 26th May 2020, 7:53am, Christopher M.
Not a well supported feature (in bash). You could have a function set multiple return values in different environment variables - similar to way functions receive parameters as $1, $2, ... you could have them return values through R1, R2, ...
photo Re: Q3: (both)
Tue 26th May 2020, 7:39am, Christopher M.
The file stop_times.txt provides the stopping sequence of all trips, so the arrival time at the next stop (if there is one) is the following line in that file. Each stop of each trip appears in the right order (the 5th field provides the sequence number...
photo Re: Clarifications for Assignment 2 (all 41)
Tue 26th May 2020, 7:36am, Christopher M.
You'll always find it challenging if you're coming from programming in language(s) with more features than bash, such as enforced types, nested functions and scope, etc. I've found it "enough" to just write many smaller functions, with fantastically-chosen...
photo Re: The direction for Q3 (all 6)
Tue 26th May 2020, 7:23am, Christopher M.
The simplest approach is to first determine 'today', using the date command, and to then only consider trips running on that day. While that work needs to run first (very early) in your script, you may wish to first assume that every day is, say, Monday,...
photo Re: Assignment 2 question 1 (all 9)
Mon 25th May 2020, 2:59pm, Christopher M.
I'm (honestly) confused as to what is confusing you about this question. Does my immediately previous reply clarify things?
photo Re: Assignment 2 question 1 (all 9)
Mon 25th May 2020, 2:58pm, Christopher M.
If the project is named 'calcmarks' (could be any other name), that does not suggest/imply the files that need updating, or the directory where the work is being performed (it will *always* be the current working directory). You need to update all *.c,...
photo Re: Clarifications for Assignment 2 (all 41)
Mon 25th May 2020, 2:55pm, Christopher M.
I'm a bit confused by your comment; most of the (too many) students first sending their comments to me appear to be making reasonable assumptions. A trip will be invalid if: - there is no train station with 1km/20mins walk of your starting position -...
photo Re: Assignment 2 question 1 (all 9)
Mon 25th May 2020, 1:48pm, Christopher M.
Hi Karan, NO, not the project *directory*, but the project's *name*. Just submit your updateversion.sh shellscript, and your modified Makefile.
photo Re: Clarifications for Assignment 2 (all 41)
Mon 25th May 2020, 1:46pm, Christopher M.
Getting down to finer details now! Either a fixed walking time, or calculation the Haversine distance will be fine. Remember, you're being assessed on your approach to the problem and the choice of commands, not obtaining the precise answer.
photo Re: The direction for Q3 (all 6)
Mon 25th May 2020, 1:43pm, Christopher M.
Yes; and if have two possible directions, you follow the sequence information for each direction, seeing if any other them arrive, or pass through, Fremantle (something I've strangly done in Boston a few times, where the network maps are often so vandalised,...
photo Re: Assignment 2 Task 2 - Open html from within the script? (both)
Mon 25th May 2020, 1:33pm, Christopher M.
Hi Matthew, No need to open the HTML files that you've created. To do so would require you to check which OS was being used and, possibly, which web-browser the user might want.
photo Re: task 2: sample size (all 6)
Mon 25th May 2020, 1:31pm, Christopher M.
Thanks for that. Was there something weird in the input data file itself that prevented it from being plotted, or just that you were processing/formatting it incorrectly?

UWA week 21 - 1st semester, week 11

photo Re: task 2: sample size (all 6)
Sun 24th May 2020, 7:40am, Christopher M.
Hi Juno, You may need to track down what is causing the problem - is it because you have too many entries, or is it something wrong in parts of the data? With your dataset of 2000 points, divide it into 2 halves of 1000, or 4 of 500. Can each of the parts...
photo Re: Assignment 2, Task 1. (all 11)
Sun 24th May 2020, 7:37am, Christopher M.
David's reply is a good one. All of the checking and updating is performed by the shellscript. The new target in the Makefile provides a simple way of calling the shellscript, passing to it the name of your project.
photo Re: Lecture recording on may 14 (all 6)
Sun 24th May 2020, 7:34am, Christopher M.
[all other readers can safely ignore this reply] There's certainly a set of race conditions there, but probably quite difficult to get that 1 in 10000 chance to catch the time window during the reboot sequence. Another approach could have been to open each...
photo Re: Lecture recording on may 14 (all 6)
Fri 22nd May 2020, 12:32pm, Christopher M.
My early examination of some of it, was that it kept the checksums of those scripts in its binary - but then I thought, if it was going down that path, why doesn't it keep the scripts in its binary, and then run them dynamically? Also, would leave less...
photo Re: Assignment 2, Task 1. (all 11)
Fri 22nd May 2020, 12:29pm, Christopher M.
Yes, that's correct. Your script will need to know the name of the project that it's updating, otherwise you won't know what/how to find the appropriate comment lines in the files. Do not rely upon the project's name being in a directory of the same name...
photo Re: Clarifications for Assignment 2 (all 41)
Fri 22nd May 2020, 10:02am, Christopher M.
Yes, your starting lat/lon (or any other starting point), that you manually provide to your script.
photo Re: sed changing rw to r permissions on files in WSL (all 7)
Fri 22nd May 2020, 9:55am, Christopher M.
For the relatively small files we're working with, you can just use: sed .... < infield > outfile && mv outfile infile
photo Re: sed changing rw to r permissions on files in WSL (all 7)
Fri 22nd May 2020, 8:11am, Christopher M.
I can't replicate the problem on macOS or Linux (even while simultaneously editing the file), so it does sound like Windows doing strange things. It's a 'common/boring' kind of operation, but I can't find related discussion about it online.
photo Re: Assignment 2, Task 1. (all 11)
Fri 22nd May 2020, 7:42am, Christopher M.
There's no need to know or assume where your updateversion script is installed (in the same way that you've previously not worried where cut, date, grep, .... are stored). While testing your assignments, we'll place a fresh copy of your script in the same...
photo Re: Lecture recording on may 14 (all 6)
Fri 22nd May 2020, 7:39am, Christopher M.
You're correct; nor is the lecture of yesterday, yet. A big weekend coming up, as many staff have been busy this week entering (fighting) the new ExamSoft software.
photo Re: The time of releasing mark of Assignment 1 (all 10)
Fri 22nd May 2020, 7:37am, Christopher M.
Hi Lee, you're in the updated list today. Will inform everyone when the marks are available.
photo Re: Assignment2 Q3 maps (all 8)
Fri 22nd May 2020, 7:35am, Christopher M.
Ditto; while in the US for 6 months last year, my Australian credit card kept hiring rental cars in Florida (while I was in New Hampshire); a challenge to convince my Australian bank of things that didn't happen. The requirement to produce a Google Map...
photo Change of requirements for Assignment 2, Q3.
Fri 22nd May 2020, 7:32am, Christopher M.
The requirement to produce a Google Map of your trip has been removed. Have your script simply print out your starting location, the departure time from your starting location, and the train stations where you get on and off any trains; any clear format...
photo Re: assignment 2 q2 (all 13)
Thu 21st May 2020, 7:52am, Christopher M.
Hi Jordan, It's always preferred to have a more general script, one that can process different inputs (without having to change the script itself - which is actually much easier with a scripting approach, than a compiled approach). So, yes, use of a command-line...
photo Re: The time of releasing mark of Assignment 1 (all 10)
Thu 21st May 2020, 7:40am, Christopher M.
In theory, by last week, but that hasn't happened. But certainly soon, well before Assignment 2 is due.
photo Re: Assign 2 Q2 - execution time very long (all 3)
Tue 19th May 2020, 12:12pm, Christopher M.
Hi Fraser, 45 minutes is clearly far too long (but I admire your patience!). Invoking new processes takes the most time and, I suspect, that you're invoking awk for every line of the log file 93000x). Can you restructure your approach, so that you invoke...
photo Re: Microsoft President: We Were 'On the Wrong Side of History' About Open Source (all 3)
Tue 19th May 2020, 7:15am, Christopher M.  O.P.
Yes, it's been an interesting few years, with Microsoft buying GitHub and IBM buying RedHat, MS providing WSL, and both of them contributing new software and improvement s back to the open-source world (such as MS's Visual Code editor). My prediction...
photo Re: Clarifications for Assignment 2 (all 41)
Mon 18th May 2020, 5:38pm, Christopher M.
Only if you need to transfer from one train line to another, so that you can leave Perth Station on the Fremantle Line. Obviously any time waiting delays your arrival at the final train station, so just ensure that you can get there on time.
photo Re: Assign 2, Q3 - haversine.awk implementations (all 3)
Mon 18th May 2020, 3:53pm, Christopher M.
Hi David, No quite; it's a shellscript (executed by bash) that immediately (and only) calls awk. make it executable, and then run: ./haversine.awk -31.8 116.0 -31.9 115.9 As provided, it reads the lats+lons from command-line arguments, but you may wish...
photo Re: Assignment 2, Task 2 (both)
Mon 18th May 2020, 3:36pm, Christopher M.
You're given some freedom to choose what and how you want to display; in previous years (when a similar task asked for more examples0, students appreciated that the task was no so prescriptive. All are just examples of something that is increasing; in...
photo Re: Assignment2 Q3 maps (all 8)
Mon 18th May 2020, 3:24pm, Christopher M.
I'm looking into this; I (must) have an old Google Maps account, which was free at the time. Did not appreciate that they had started charging for it. I believe that the monthly free allowance is sufficient for the set task, but appreciate that some...
photo Re: Clarifications for Assignment 2 (all 41)
Mon 18th May 2020, 10:39am, Christopher M.
Your explanation either sounds confused, but it may just be the words you're using. There is no mention, anywhere, of a *project number*, just the project's name. The project's name will not require changing. If all files (currently) have the same name,...
photo Microsoft President: We Were 'On the Wrong Side of History' About Open Source (all 3)
Mon 18th May 2020, 6:57am, Christopher M.
An interesting article, and readers' comments, here: https://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Pres-On-Open-Source Historical reference: https://slashdot.org/story/01/06/01/1658258/ballmer-calls-linux-a-cancer

UWA week 20 - 1st semester, week 10

photo Re: task 1 (all 4)
Sun 17th May 2020, 6:03pm, Christopher M.
Yes; depending on what the value of $projectname is, your script will find, check, and update the comment lines involving that project's name.
photo Re: some question about assignment2 task3 (all 4)
Sun 17th May 2020, 6:01pm, Christopher M.
From that location, your script should report that it's not possible to meet the requirements for the trip.
photo Re: question about assignment2 task3 (all 3)
Sun 17th May 2020, 9:42am, Christopher M.
Please see the Clarifications.
photo Re: Assignment 2, Q3 (all 4)
Sun 17th May 2020, 9:41am, Christopher M.
Please see the Clarifications.
photo Re: Assignment2, Q3 (all 4)
Sun 17th May 2020, 9:11am, Christopher M.
Yes, just simple walking in a straight line - "as the crow flies". No need to ask Google or any other service to find the correct distance.
photo Re: assigment2 Q2 (both)
Sun 17th May 2020, 9:04am, Christopher M.
There's no need for any 'rules'. The suggestion/reminder about using head and tail is so that you can test your shellscripts with smaller subsets of the data.
photo Re: Assignement 2, Q1 Assumption (all 5)
Sat 16th May 2020, 11:38am, Christopher M.
I could interpret that a couple of ways :-)
photo Re: Assignment2, Q2 (all 13)
Fri 15th May 2020, 6:04pm, Christopher M.
All months just 3 characters long. Thanks.
photo Re: question about route strategy (all 4)
Fri 15th May 2020, 5:20pm, Christopher M.
Thanks David.
photo Re: Assignment2, Q2 (all 13)
Fri 15th May 2020, 5:19pm, Christopher M.
Sorry, I don't understand the question. The first line in the same has (only) this date: 03/May/2020 What do you mean by short or full ??
photo Re: Assignment2, Q2 (all 13)
Fri 15th May 2020, 5:17pm, Christopher M.
The logfile provided is a real one, and you can presume that any others will also be real. No need to clean the data, as there (shouldn't) be any noisy data in it.
photo Re: Assignement 2, Q1 Assumption (all 5)
Fri 15th May 2020, 5:16pm, Christopher M.
Hi Lee, The "version line" will appear only once in each file (that it appears in), but it could be anywhere. Replace/update it at the exact same line number. The project name is an argument provided to the shellscript. Do not assume/depend on the project...
photo Re: Clarifications for Assignment 2 (all 41)
Fri 15th May 2020, 5:12pm, Christopher M.
I'm unsure if you're asking a question (or just validating your idea). You have the freedom to choose any meaningful metric(s) and visualisation you want.
photo Re: question about route strategy (all 4)
Fri 15th May 2020, 5:11pm, Christopher M.
Hello Yue, Yes. Just use either of the two Haversine function implementations to calculate the (straight line) distance and divide by a typical walking speed. Yes; you want to reach the Rottnest Ferry as quickly as possible, prior to 15:30. Though, of course,...
photo Re: Assignment 2: Question 1 Makefile part (both)
Fri 15th May 2020, 1:52pm, Christopher M.
Yes, but not in the Makefile - in the shellscript. The project's name (to be found as comments in files) is passed to your shellscript as an argument.
photo Re: some question about assignment2 task3 (all 4)
Fri 15th May 2020, 1:50pm, Christopher M.
Sorry, I was trying to make it as general as possible. Your starting point will need to be with 1km (walking) of a train on the Fremantle Line (blue): https://helloperth.com.au/map/perth-rail-network-map/ Or within 1km of a line that gets to Perth or Perth...
photo Re: Windows WSL - sudo password problem (both)
Fri 15th May 2020, 12:40pm, Christopher M.
Just in case others are having a similar problem, we fixed this by reseting the personal password, and then using the personal password when asked by sudo: su root <type in root's existing password> passwd personalaccount <type in new password> <type in new...
photo Re: Assignment 2 Q2 (all 13)
Fri 15th May 2020, 3:55am, Christopher M.
I cannot tell what you mean by "I used a loop...", as there are many possible ways. But my guess is that you have something like: {{{ for i in `cat filename` do echo $i done }}} This will not work as you probably hope, because placing a command in backquotes...
photo Re: Assignment 2, Q2 (all 13)
Thu 14th May 2020, 3:48pm, Christopher M.
Yes, in the very same format as the sample (real) file provided.
photo Re: Clarifications for Assignment 2 (all 41)
Wed 13th May 2020, 4:23pm, Christopher M.
Yes, you'll need to divide your walking distance by an average walking speed. No, Google doesn't provide any additional information, or route planning. Google Maps just provides the background image, and displays your calculated route.
photo Re: Clarifications for Assignment 2 (all 41)
Wed 13th May 2020, 3:44pm, Christopher M.
Hi, Yes, mostly correct: - check for and report existing version mis-matches first. Do not make any changes/updates if there's a problem. - yes, update the version number (in *.c, *.h and the Makefile), but also update the date+time as well. Good luck,
photo Re: Assignment 2 Q1 (all 16)
Wed 13th May 2020, 6:43am, Christopher M.
Yes, the task asks - "Your shellscript should also detect and report the problem of any of the files having different versions numbers to any others." Yes. (Not your fault, but) there's the same answer to this question here: https://secure.csse.uwa.edu.au/run/help4407?p=np&a=155&all=y2...
photo Re: Assignment 2, Task 1. (all 11)
Wed 13th May 2020, 6:39am, Christopher M.
Please submit your modified Makefile as well, else it may not be clear how your Makefile invokes your shellscript (x 105 students).
photo Re: Assignment 2 - Q1 (all 16)
Tue 12th May 2020, 2:58pm, Christopher M.
Sounding much better! Yes, make will run any/many actions, asking bash to run the actions for it. make has 'no idea' what it is executing, it just asks bash to do it. Yes, though say 'make performs the actions required to build yyyy. If the commands yyyy...
photo Re: Assignment 2 - Q1 (all 16)
Tue 12th May 2020, 2:21pm, Christopher M.
Hi Nathan, A shellscript is a textfile of bash commands (of almost anything, typically in a one-command-per line format). We can have bash read and execute those commands by running: bash filename or by making the shellscript (file) directly executable...
photo Re: Assignment 2 - Q1 (all 16)
Tue 12th May 2020, 12:18pm, Christopher M.
Hi Nathan, Running make updateversion requests that the make program runs, it finds/reads the Makefile (providing the specifications) and, if necessary, executes the commands for the target named 'updateversion'. As a good practice, we have one project,...
photo Re: Task_1-Assignment 2 (both)
Tue 12th May 2020, 11:57am, Christopher M.
No need to display it (though you can if you want to - may help you while testing it). Don't forget to change the version information in your Makefile, too. Good luck.
photo Re: iTerm2 - Auto Coloring (all 5)
Mon 11th May 2020, 5:06pm, Christopher M.
Hello David, Difficult to imagine what the problem is form your description alone. I've never done that! If you did not have a ~/.vimrc file before (thus nothing to lose), you can just delete it (rm ~/.vimrc) and then follow the instructions again. The next...
photo Re: Assignment 2, Q1 (all 16)
Mon 11th May 2020, 5:04pm, Christopher M.
Hello Mingbo, Your solution doesn't need to detect any changes (which you could do with 'diff' - but don't!) We're imagining that the human programmer has decided it's time for the software's next version to be released, and so they just type: make updateversion...
photo Re: Assignment 2: Permissible Software (all 4)
Mon 11th May 2020, 4:27pm, Christopher M.
Hi Lee, Yes, Perl was an attempt to build a massive single language, a swiss-army-knife, that could do everything. It's still popular amongst the shrinking band of people that can actually read Perl scripts, but its overloaded use of punctuation (in contrast...
photo Re: Project 2 - Q1, Makefile execution on OSX (both)
Mon 11th May 2020, 12:16pm, Christopher M.
You do not run the Makefile, itself, you just run make which will read the Makefile and decide what to do.
photo Re: Lab Zoom Link (both)
Mon 11th May 2020, 4:00am, Christopher M.
Hi Clariza, Our Zoom links are here: https://teaching.csse.uwa.edu.au/units/CITS4407/onlineteaching.php (a link in the left-hand margin). I'm afraid I don't recognise the link you've given; none of ours have a password.

UWA week 19 - 1st semester, week 9

photo Re: Assignment 2: Permissible Software (all 4)
Sun 10th May 2020, 11:51am, Christopher M.
Hi Lee, I appreciate the sentiment of your your question :-) The goal of this unit, and hence its assessments, is to learn how to use the variety of small tools, using them in combination with each other and the file-system. So 'opening-up' solutions to...
photo Re: Ubuntu for WSL and make (all 4)
Sun 10th May 2020, 11:20am, Christopher M.
Thanks for sharing the solution James.
photo Re: Clarifications for Assignment 2 (all 41)
Sun 10th May 2020, 11:18am, Christopher M.
Hi, All file must have the exact same project-version-date line (a comment), otherwise you'd be sure that they were all part of the same project, and wouldn't know what the next version number should be. You should detect+report if there's such a problem...
photo Re: Would you please record upload today's Lab? (all 3)
Fri 8th May 2020, 3:46pm, Christopher M.
OK, it was recorded and has now been uploaded to the standard place. Warning - it's 2 hours of almost no discussion and (politely) probably not worth listening to.
photo Assignment-2 is now available
Fri 8th May 2020, 12:08pm, Christopher M.
Assignment-2 is now available from our unit's Schedule page. Please note the marks awarded for the 3 questions - 6, 6, and 18, so allocate your time appropriately. Good luck,
photo Re: Would you please record upload today's Lab? (all 3)
Fri 8th May 2020, 12:07pm, Christopher M.
Hi Jordan, Am (right now) recording it; and will keep arriving students aware that it's being recorded.
photo Re: Assignment 2 (both)
Thu 7th May 2020, 6:31pm, Christopher M.
Hello Veronica, (As stated in an email sent to all yesterday, and in the latest announcement on this forum) hopefully Friday (tomorrow) morning.
photo Laboratory session (via Zoom) cancelled for Thursday 7th 4-6pm
Thu 7th May 2020, 8:48am, Christopher M.
Hello Everyone, I'm afraid that I'm cancelling the lab session today, Thursday 7th, as I'd have to leave quite early to travel to attend an Industry Advisory Panel meeting. Today's lecture recording will be uploaded in time, and we'll have our normal lab...
photo Re: iTerm2 - Auto Coloring (all 5)
Wed 6th May 2020, 4:59pm, Christopher M.
Hello David, What you're describing is not directly related to iTerm2 or macOS, but to configuring the vim editor to recognise and colour code from common programming languages (and works on Linux, too). Firstly, see if you already have a .vimrc file : ls...

UWA week 18 - 1st semester, week 8

photo The lecture recording for week-8
Thu 30th Apr 2020, 4:20pm, Christopher M.
In the recorded lecture material of week-8, I introduced regular expressions, and 3 frequently used commands that use them - grep, sed, and awk. The use of the first two commands was (hopefully) clear, but in the last 5 minutes of the video I made a mistake...
photo Re: About exercise 4 (all 3)
Wed 29th Apr 2020, 5:03am, Christopher M.
Hello Kebing, OK there's two questions here, one about "here document" (using << ), and another about accessing command- line arguments ($1, $2, ...) ... You're familiar with input redirection: command [optional-arguments] < input-filename where the input...
photo Problems reaching teaching.csse.uwa.edu.au - use the VPN
Wed 29th Apr 2020, 3:31am, Christopher M.
THE PROBLEM NOW APPEARS TO BE FIXED! As many of you have seen, and reported, access to teaching.csse.uwa.edu.au has been very intermittent over the past 24 hours. Unfortunately, this is not a problem that I, or other CSSE staff, can fix because the host...

UWA week 17 - 1st semester, week 7

photo Re: Windows Subsystem for Linux (WSL) -Step 4(Unable to save the configuration file ) (all 4)
😢Fri 24th Apr 2020, 5:37pm, Christopher M.
Thanks everyone; teamwork!
photo Re: The time of releasing mark of Assignment 1 (all 10)
Fri 24th Apr 2020, 12:57pm, Christopher M.
Hello, I can't provide a definitive date, yet, as some students have requested extensions until the end of next week (and beyond), and still more requests are arriving. Hopefully around the time Assignment 2 is released.
photo Re: resolution of recorded lectures is too low (all 3)
Fri 24th Apr 2020, 3:43am, Christopher M.
Thanks Nathan, yes, definitely very difficult to read. I'll increase the font size, and place less on each window (and hence less white space) next week. Unfortunately, it's not a fault in the original recording, but one in the transcription process used...

UWA week 16 - 1st semester, mid-semester break

photo Re: Assignment - Question 3 (both)
Sun 19th Apr 2020, 11:32am, Christopher M.
Yes - just like the index of a traditional book is.
photo Re: Problem with script functionality on Ubuntu Linux and MacOS (all 6)
Fri 17th Apr 2020, 4:16am, Christopher M.
Do not be concerned about this; most of us have lost (easy) access to the CSSE lab machines running RedHat, so we'll be marking on Ubuntu (or macOS), and will be looking for 'obvious' problems. Ah!! what a year so far.
photo Re: Assignment 1, Task 4 (all 13)
Fri 17th Apr 2020, 4:14am, Christopher M.
Hi Akhil, Just assume that the correct, expanded file will be in your working directory. No need to fetch the file or unzip it in your script, and no need to upload any data files as part of your submission.
photo Re: Assignment 1 - Task 4 (all 13)
Thu 16th Apr 2020, 6:31pm, Christopher M.
No embellishments, thanks. It actually slows down the marking process if some solutions appear on the screen while others 'disappear' into a file. Just as things say on the assignment sheet (and the Clarifications).
photo Re: Assignment (both)
Thu 16th Apr 2020, 3:29pm, Christopher M.
Certainly (almost expected you'll need, or choose, to)
photo Re: Assignment 1 Task 1 quick question (all 6)
Thu 16th Apr 2020, 12:24pm, Christopher M.
It won't be a problem (provided it works). I don't wish to have to diagnose any problems if your validating code, itself, doesn't work.
photo Re: Assignment 1 Task 1 quick question (all 6)
Thu 16th Apr 2020, 4:31am, Christopher M.
Hi Ryan, The dates (the inputs) will be valid dates in the correct format. You do not need to check/verify them. It means that one date follows the other (on a calendar). Such as 16/04/2020 and 17/04/2020; 17/04/2020 and 16/04/2020; 30/04/2020 and 01/05/2020....
photo Re: Task 3 - Assignment 1 (all 5)
Thu 16th Apr 2020, 4:27am, Christopher M.
Hi Rohit, Yes, that is the correct interpretation. (For this assignment) it is not the role of the script writer to correct possible mistakes of the book author.
photo Re: Assignment 1 | Question 3 (both)
Wed 15th Apr 2020, 12:05pm, Christopher M.
Hello Brian, Please re-read the question :-)
photo Re: Question 3: Should we ignore casing ? (all 5)
Tue 14th Apr 2020, 7:51am, Christopher M.
The document is still there, unmoved, at: http://teaching.csse.uwa.edu.au/units/CITS4407/assignments/assignment1-clarifications.php (just using http: not https: ) ... I suspect that you're using Safari on a Mac, which has a relatively new (annoying) feature,...
photo Re: Testing Assignment on Lab Machines (both)
Tue 14th Apr 2020, 7:43am, Christopher M.
Hello Lee, If it's working on macOS (and you say so in a comment in your submission), then that will be fine. There is some facility to access CSSE Lab equipment using Unidesk but, for me, it was so slow that I couldn't be bothered waiting for it to connect...
photo Re: Task 3 - Assignment 1 (all 5)
Mon 13th Apr 2020, 4:33pm, Christopher M.
I appreciate your concern and desire to get this correct, but you're "overthinking it". Yes, ANY characters may appear within the angle brackets. If the character sequences between two sets of angle brackets are different, then they result in different index...
photo Re: Assignment 1_task 2 and submission (both)
Mon 13th Apr 2020, 3:18am, Christopher M.
Please produce your (6) results as on the Assignment sheet (any program receiving the results as input will be expecting 6 lines, not just 1). Just as stated on the Assignment sheet please.

UWA week 15 - 1st semester, non-teaching week

photo Re: Question 3: Should we ignore casing ? (all 5)
Sat 11th Apr 2020, 5:39am, Christopher M.
Hello, Yes. Please read the Clarifications page.
photo Re: Assignment1_submit (both)
Thu 9th Apr 2020, 4:33pm, Christopher M.
Yes, it will just overwrite your previous submission(s) that have the same filename(s).
photo Re: Assignment 1, Task 4 (all 13)
Thu 9th Apr 2020, 3:21pm, Christopher M.
No, that's OK. I was stating that *I'm* not adversarial - there's a lot of leeway in the marking process, and even bit of generosity if it's clearly deserved. Unfortunately, I receive questions (in all my units) that suggest to me that many students have...
photo Re: Assignment 1, Task 4 (all 13)
Thu 9th Apr 2020, 2:56pm, Christopher M.
OK. Assessment is not an adversarial process.
photo Re: name question about task4 (all 5)
Thu 9th Apr 2020, 12:47pm, Christopher M.
Yes, for this exercise, a family must have 2 or more people. All others (individual people) do not get reported.
photo Re: name question about task4 (all 5)
Thu 9th Apr 2020, 12:33pm, Christopher M.
Her surname is "Van Impe". In all cases, it's everything before the comma. Think of it as a field with two subfields: FamilyName, PersonalName And we know of a number of commands for dealing with fields!
photo Re: Assignment 1, Task 4 (all 13)
Thu 9th Apr 2020, 3:52am, Christopher M.
Yes, let's REQUIRE that that is the filename to be used (as that's what we download), and your script may assume that it's in your current working directory. Thanks for raising it.
photo Re: Task 1 (all 4)
Thu 9th Apr 2020, 3:47am, Christopher M.
No, all differences should be positive, just like the example on the assignment page. Sorry.
photo A number of free Linux ebooks (if you're quick) (both)
Wed 8th Apr 2020, 7:01pm, Christopher M.
Amazon have 'on sale' a number of Linux ebooks: https://www.amazon.com.au/dp/B00HNC1AXY You'll need an amazon.com.au account to buy and fetch them, and there's a number of online services to convert the Kindle format to .epub or .pdf Probably only available...
photo Preserving open source software for future generations
Wed 8th Apr 2020, 12:31pm, Christopher M.
An interesting webpage and project: https://archiveprogram.github.com but as important as the Svalbard Global Seed Vault ?? https://www.seedvault.no
photo Re: Assignment, Question 2 (both)
Tue 7th Apr 2020, 5:58pm, Christopher M.
Hi Veronica, No, the supplementary numbers are not recorded/selected on a valid 6-number ticket. https://www.youtube.com/watch?v=wGqHD5BAPtg
photo Re: Assignment 1. Task 4. (all 13)
Tue 7th Apr 2020, 11:12am, Christopher M.
It really doesn't matter. Assignments will be marked manually, by humans, and we're able to work out the task you're attempting by reading the contents of your script (which we do anyway, to ensure that they're not going to delete all the marker's other...
photo Re: Links on help4407 page not working. (both)
Mon 6th Apr 2020, 2:46pm, Christopher M.
Thanks for reporting that. Should be better now. ??
photo Re: Assignment 1- Question 4 (all 4)
Mon 6th Apr 2020, 12:26pm, Christopher M.
They would not be listed as the *whole* family did not survive. Would be listed. Yes (except there's no reason to include your phrase 'instead of'). Only and all families where all members survived will be listed.
photo Re: Assignment 1- Question 4 (all 4)
Mon 6th Apr 2020, 8:44am, Christopher M.
Hi Wei, As an example, if all members ( >= 2) of the Liew, McDonald, and Kennedy families survived the shipwreck, a suitable output for this task would be the 3 lines: Liew McDonald Kennedy Does that make more sense?

UWA week 14 - 1st semester, week 6

photo Re: Assignment 1. Task 3. (both)
Sun 5th Apr 2020, 5:53am, Christopher M.
Hello David, Any simple textfiles are suitable, such as the ones in Exercise sheet 3. You may safely assume that the files used for testing will only have '<' and '>' around the terms required in the index, and that each '<' will be followed by '>' on the...
photo Re: Assignment 1 - Q2 (both)
Fri 3rd Apr 2020, 11:41am, Christopher M.
Hello Weichean, No, the numbers on a valid Lotto ticket cannot be repeated - that's why there's a bit of a challenge to this exercise!
photo Solutions to all Exercise sheets now available
Fri 3rd Apr 2020, 7:36am, Christopher M.
Solutions to all Exercise sheets are now available from our Schedule page: http://teaching.csse.uwa.edu.au/units/CITS4407/schedule.php Please keep in mind that these are only *sample* solutions, and there's certainly alternative and better solutions possible....
photo Re: Output for Question 2 in Exercise 3 (all 9)
Thu 2nd Apr 2020, 6:56pm, Christopher M.
Thanks David; when working in the US I usually also set: LANG=en_AU.US-ASCII but I don't think that that's required for this exercise. The command man environ also provides a little more explanation of these variables.
photo Re: Assignment 1 Task 1 (both)
Thu 2nd Apr 2020, 6:54pm, Christopher M.
Yes, 18. Corrected. Thanks David. My proof: 20 - 2 = 18.
photo Assignment 1 now available
Thu 2nd Apr 2020, 2:25pm, Christopher M.
Assignment 1 is now available from: http://teaching.csse.uwa.edu.au/units/CITS4407/assignments/assignment1.php Please post requests for clarification about any aspect of the assignment to help4407, so that all students may remain equally informed. The...
photo Moving to pre-recorded lectures
Wed 1st Apr 2020, 7:21am, Christopher M.
Hello Everyone, Due to the worsening conditions I'm experiencing with my NBN service at home, all future lectures will be prerecorded, and not live-streamed using Zoom. Lecture recordings will continue to be uploaded to our standard Echo360 location within...
photo Re: Store a variable to indicate a filename (both)
Mon 30th Mar 2020, 2:18pm, Christopher M.
Hello, When someone else asked this same question, I added the following to the Exercise sheet: Inside your shellscript (file), you can access the provided command-line argument using the value of $1. Sorry, but you may not have seen that if you hadn't...
photo Re: Output for Question 2 in Exercise 3 (all 9)
Mon 30th Mar 2020, 2:15pm, Christopher M.
Hello, When you have a problem like this - unexpected output from a long pipeline of commands - perform each of the subparts of the command "by hand" to ensure that what you *hope* is passing through each pipe is really what's happening. For example, with...

UWA week 13 - 1st semester, week 5

photo Re: Windows Sub-system for Linux is really good (Trust me) and other cool ways to linux from home (all 5)
Tue 24th Mar 2020, 10:12am, Christopher M.
Thanks very much for posting this information Ryan. I've added some instructions for installing and setting up WSL on a new page linked from our webpages' left-hand-margin. Good luck.

UWA week 12 - 1st semester, week 4

photo Re: what happened to thos weeks lecture and exercises? (all 3)
Sat 21st Mar 2020, 3:45am, Christopher M.
Hello Nathan, Did you not receive a copy of the email, below, that was sent through LMS to all enrolled students last Wednesday? We'll be back-on-track from next Thursday 26th, with more information to follow before then. ... Hello Everyone, I trust that you've...
photo Re: Question 3 in Exercise2 (both)
Fri 20th Mar 2020, 2:24pm, Christopher M.
Keep in mind that cut performs a vertical cut - it just saves the required (vertical) columns that we want. cut cannot be used to request which (horizontal) lines we want. Instead, we can use grep to select just the (horizontal) rows that we want. All...
photo Re: Problem with Q2 in Exercise 2 (both)
Fri 20th Mar 2020, 2:15pm, Christopher M.
Hi Khushboo, When describing (future) questions, it'd be great if you can describe your error in a bit of detail. All we have is "But it isn't working", and knowing what you're seeing or not seeing would help. I think the problem is with your invocation...

UWA week 11 - 1st semester, week 3

photo A problem with Q1 on Exercises #2
Fri 13th Mar 2020, 5:25am, Christopher M.
During yesterday's workshop (Thu 12/3) we found a problem with Q1. While it was possible to correctly download datafiles from the FuelWatch website using a web browser (such as Firefox), it was not possible to do so with curl, as the website's links (URLs)...

UWA week 9 - 1st semester, week 1

photo Welcome to CITS4407
Wed 26th Feb 2020, 5:59am, Christopher M.
Welcome Everyone. CITS4407 is an on-campus unit presented through in-class sessions at which new information is presented, examples and exercises can be attempted on the computers in the laboratory, and students are strongly encouraged to ask questions during...
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  9:57am Nov 18 2020