Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
Hi Ziyuan and everyone,
It turns out that there was a feedback tool I need to set up, and a setting I had missed. That done, I believe you should be able to see both the mark and the respective answers feedback. Please let me know if that's not what...
Hi Suan,
I can assure you, and everyone, that all the submitted scripts were marked, and I have clicked the links to release the answers. Clearly something is not happening as it should. I'll follow up with the LMS people tomorrow after the lecture.
Ch...
Hi Everyone,
As Ziyuan said, you can download the recording and play it on your own device. I tried it just now. I have no idea why the streaming version is not working, but there is a work around.
Cheers
MichaelW
Hi Ziyuan,
Your (and everyone's) learning is important to us, which is why we do it. When I know all the submissions have been marked, I'll figure out how to release the feedback. LMS is a complicate beast. In any case, soon.
Have a good weekend
Cheers
M...
Hi Kai,
Some material for the workshops was shuffled around, so arcade.csv is in Lab6, australian-universities.csv is in Lab8. Must put that on the list of things to tidy up for next year.
Cheers
MichaelW
ANONYMOUS wrote
Hi,
I will say more about the final exam close to the time, but yes, as before, you will be allowed to bring a single A4 page into the exam (printed or hand-written, both sides, if you wish).
Cheers
MichaelW
Hi,
I shall respond to each in turn.
ANONYMOUS wrote
See earlier response (no)
This was discussed in lectures
See earlier threads
See earlier threads
The file should not end in .sh (but ok this time), but yes, any directory, which you then zip. The directo...
ANONYMOUS wrote
Hi,
The idea behind both discussions is that if input has a sensible reading, disregarding capitalisation, then you could logically call it a mistake, or you can use the data you've been given for full marks (if correct ). Logically, t...
ANONYMOUS wrote
Hi,
Having multiple scripts called by the top-level one is perfectly fine; providing for that possibility is why a zip'd or gzip'd directory is required for the submitted program. However, please do not have you own call to chmod. The ...
ANONYMOUS wrote
Hi,
The first argument is the full pathname to the file, which the testing program will supply. All your program has to do is open the file associated with 1; if it's not there, the program should simply stop and print an error messag...
Hi Alexandra,
Given the actual range of survey dates, and the fact that we are coding this now, I took the pragmatic view that 2022 (and earlier) is past, while 2025 is future. Still, nice idea.
Cheers
MichaelW
Hi Zichen,
It just means that whatever you did was submitted as is, so that's all that will be marked. Does it matter? Not really, given the context. (I'll set it up differently next time.)
Cheers
MichaelW
ANONYMOUS wrote
Hi,
I have no idea how or why one might use the find command in a situation where the input data consists of a single file (not directory). More to the point, you have to be very careful with find as the command can traverse a lot of f...
Hi,
We've only just covered it. As I mentioned a while back, I release solutions a couple weeks after the week when the lab would cover the lecture, to give people time to try it. I've recently released the solutions for Lab 5. (Congratulations on bei...
ANONYMOUS wrote
Hi
What I was trying to indicate is that treating malE as an error is not wrong, but does make use of perfectly usable information, so would be worth less as an answer, therefore half marks for that question.
Cheers
MichaelW
Hi Suan
Not quite echo 'fred cat' sed -e 's a-z a-z '
The single quote are also important (to top the info for sed being instead processed by Bash.
Cheers
MichaelW
ANONYMOUS wrote
Hi,
In the words of Han Solo, I have a bad feeling about this . (My apologies if I'm being unfair.) Please make sure your script works on the standard environment provided by either the Docker class image, or Linux Lab in the UniAp...
Hi,
I'll answer each part after the question
ANONYMOUS wrote
I hope it's clear that I'm expecting the program to deal with other error states. Given that I've not told you what they are, I can hardly be pedantic about the error message. True? While you...
ANONYMOUS wrote
Hi,
One thing you need to learn is that if something is made explicit in a specification, typically because it needs to work with other modules then you must keep to the spec. However, just this time, I shall accept tobacco nation or t...
Hi,
It's way too early to talk about the final exam, and the truth is that I've not designed it yet. There will be a past exam you can look at, which we'll also discuss in class. As you mention, you will be allowed to bring in a single sheet of A4 pap...
ANONYMOUS wrote
The best hint I can offer, short of spelling it out, is to go back to the lectures L1 to L6 (including L5, though the order was swapped). While the efficiency will be poor, you only need to use the language structures and Unix command...
Hi Kaichao,
I cannot see why there is a problem, so I've extended the test till tomorrow, 11 59pm and will ask IT for help.
Thanks for letting me know
Cheers
MichaelW
Hi Runzhi,
Seeing you've asked a number of questions, I'll follow each, in turn, with my response, rather than leaving it to the end.
sort has been used for some time, and grep is also fairly recent, so sure. They are still "simple" Linux commands. (Th...
Hi Eusha,
Done. For good measure, I also uploaded the code that was created for L6 and today's lecture, L9.
Enjoy ... (ok, perhaps not, but I hope you find it useful).
Cheers
MichaelW
Hi Everyone,
I realised that the lecture did not define what a Bash while loop is, beyond the examples. I have now revised the lecture slides (and PDF) to include a slide on what a while loop looks like, and how it works.
I also took the opportunity to...
Hi Everyone,
This is in response to some questions I was asked in the lab.
What if the user types male rather than the expected Male?
My attitude to error handling is quite pragmatic
- Is there a sensible interpretation of the input data that is close...
ANONYMOUS wrote
Hi
) The name of the directory containing the script can be anything.
) You don't need to include the .csv file, as I shall be using my own. However, no harm done if you do include it; I'll simply ignore it.
) Don't worry about file ...
Hi,
The number of white spaces is not relevant; I believe in auto-testing (for uniformity and fairness), but not auto-marking, because humans are much better at dealing with differences in the output that are actually not relevant. In particular, diff...
Hi,
I discussed dev stderr in response to another query. Please look there.
Regarding the file name, the specification says that the name has to be tobacco nation (with no suffix). However, people find it very hard not to add a .sh, so - while techni...
Hi,
There is a little confusion here. For all Bash messages you need to use echo. The only question then is where the message is to be printed.
echo "Fred here"
will print to stdout (or dev stdout). That is the default destination, so you don't have ...
Hi Rabea,
Use of Bash functions is fine; It's just that we've not covered them yet. The are not "advanced" (I really should have chosen a different word), by which I intended more advanced Unix tools, such as awk (and bc), where you can pretty much ge...
Using gzip (and then gunzip) on the directory containing the script(s) is also fine. In retrospect, given that I've been pushing Unix Linux specific tools, for authenticity I really should have asked for Linux native gzip over the more optional zip. ...
Hi Suan,
For example, let's say that the argument to this program is a word 1 being sought in a text 2
if grep 1 2 dev null
then
echo "The word 1 is found in 2"
else
echo "The word 1 is not found in 2"
fi
In this case we don't want ...
Hi,
This makes no sense to me. If you are able to capture a floating point real in this way (outside of Awk), you will comparing strings, which is not a good idea if you actually are working with numbers (see the discussion on arithmetic versus string...
ANONYMOUS wrote
Hi,
If you are running the standard Ubuntu Bash Gnu-Shell-Tools set up, having the .sh on the end of file name should not matter. Instead you need the usr bin env bash as the first line. (To my taste, having .sh at the end of Shell ...
Hi Suman,
I don't really understand the question. Bash printf prints data to standard output. I can't see how you can use Bash's printf to compare floating point values. Sorry. Confused. (Bash only supports integer arithmetic - which we'll cover short...
Hi Baoyue,
Please go back over Lecture 5 Variables, particularly the material on the PATH variable. You will notice I have put '.' in my PATH, so did not have to explicitly use . count occurrences.
Cheers
MichaelW
Hi,
I wouldn't class the read command as advanced. It's just that we've not covered it yet as it's related to loop structures, which we only get to do next teaching week. Please just use the stuff we've covered - for now. Trainer-wheels will come off...
Hi Nathan, short answers are No and Yes. Longer answer, bc is a small language similar to awk in concept, though more limited. The point of this assignment is get you using the language structures we have covered in the unit, literate programming, an...
Hi Suan,
They are both places where standard output, e.g. from echo, can be redirected. dev stderr (don't forget the first ' ' ) is standard error output (for error messages), while dev null is literally nowhere, a black hole, which simply gobbles u...
Hi Suan
A better way of saying 1 2 echo ERROR
is echo ERROR dev stderr
The first of these can be used by all Unixes Linuxes, but is very unobvious syntactically; translation take the output sent to stdout (file descriptor 1) and send it instead t...
ANONYMOUS wrote
Hi,
I have no idea why you are unable to submit your Assignment 1 file, as 6 people have managed to do so, including 2 just today. All I can suggest is please try again.
Cheers
MichaelW
Hi,
I'll talk about that tomorrow (Wed 27th), but the specification says that what the program should expect is a 3 letter ISO country code.
Cheers
MichaelW
Hi Zichen,
Unless I'm missing something, I think I covered that in yesterday's (Monday 25th) lecture on where binaries are to be found, and the PATH variable. No?
Cheers
MichaelW
Hi Everyone,
Given the questions I'm being asked about Assignment 1, I plan to use the first part of the lecture on Wednesday (27th) as a Q A about Ass 1, so BYO Questions. I'll also show you a useful command for tracking through your program as it ex...
ANONYMOUS wrote
Hi,
The range column is actually not relevant for this assignment, and the maths you suggest is well beyond the tools that I have asked you to use. Please just use the medianPC for the calculations.
Cheers
MichaelW
Hi Eusha,
Yes, it would be okay to ignore the output format in this particularly. Clearly my intention was to have Male where I would otherwise have Female, but I forgot to do that in my implementation and therefore in the examples. To be honest, I wo...
Yes,
tobacco nation
and
. tobacco nation are intended to be the same variable. This will be made clear at Monday's lecture, and - long story short - involves how you set up the PATH variable. Starting with the . is arguably better (which is anothe...
Hi Everyone,
You are aware that we don't have a lecture tomorrow morning (9am March 20). What I strongly suggest you do is make sure you have had a go at Labsheet 3. The language structures covered there are directly relevant to Assignment 1, and whil...
Hi Suan,
Don't worry. I engineered some slack in the timetable to deal with these interruptions, or simply the fact that I want to go more slowly over something, or spend the time answering questions. If you get on LMS you'll see that the Weekly sched...
Hi Everyone,
What I usually do if I receive an email query whose answer could apply to the whole, is reply to the sender and then post the answer as a FAQ. Here is the first.
Cheers
MichaelW
...
" I saw there are 2 spaces in some of your examples in the d...
Hi Kaichao,
wc is very simple it just counts the number of characters, words and lines in a plain-text file.
In general, if you are unsure about any command, I recommend using man, e.g. man wc
Finally, beware of using ChatGPT for anything; it can "hall...
Hi Zeke,
This is what I'll be talking about in tomorrow (Monday's) lecture, and why I brought that lecture forward.
As they say, All Will be Revealed ...... (cue the dramatic music)
Cheers
MichaelW
Hi Suan,
It looks like you are using Windows System for Linux (due to the Windows-format pathnae), rather than Linux itself, which you can get via the Docker image, or download and install UniApps and search for Linux Lab.
Cheers
MichaelW
Hi Weng
That is entirely fair and reasonable. It should be included. However, I know from experience that classes hate it when the specification of an assignment is changed after it has been released. I'll therefore leave the specification as it is.
I...
Welcome to helpOSTS
I've now tried the two class discussion systems available on LMS Discussion Forums and Wiki. Neither is suitable, as far as I'm concerned. The Discussion Forums are only for topics set by the unit coordinator, and are used in ca...