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 42 articles from this person

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

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

photo Re: Examplify (all 5)
Sat 13th Jun, 8:31pm, Lee dB.  O.P.
Congratulations on finishing the last exam of your masters - that's a significant achievement! Must feel good. As for the question about ways to get data into a subprocess, I used the example of pipes, command arguments and environment variables.
photo Examplify (all 5)
Sat 13th Jun, 4:25pm, Lee dB.
For those that completed their exam today, hope all went well! This was my first online exam, and just wanted to discuss what other people's experience was like. I'm running Examplify on a fresh install of macOS via an external hard drive, with no other...
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Fri 12th Jun, 10:31am, Lee dB.
Thanks Chris -- I think I've completely derailed this thread of conversation, so this may be a conversation for another time and place!
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Wed 10th Jun, 6:39pm, Lee dB.
Thanks, once again Chris, for the detailed response. It's given me some food for thought. I've recently been trying to get some environment variables to stick on my Linux machine, particularly when starting an X session from a TTY. There are so many possible...
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Wed 10th Jun, 9:33am, Lee dB.
Thanks for the historical context on Unix 6. I might have to do some reading on how the mechanism worked. I appreciate that external commands can't change the environment of the parent shell, but I was wondering if there's a fundamental reason why this...
photo Re: Questions and Clarifications for Final Exam (all 9)
Tue 9th Jun, 7:51pm, Lee dB.
Good to know, thanks Chris.
photo Re: lec # wk 10 File Attributes - Square Bracket command external or internal (all 14)
Tue 9th Jun, 7:50pm, Lee dB.
Hmmm, good mock question. I’m just testing my understanding here, but cd doesn’t strictly have to be a shell built-in, as long as there is some mechanism for CD to communicate with the shell? i.e there is no fundamental need for cd to not be external,...
photo Re: Questions and Clarifications for Final Exam (all 9)
Mon 8th Jun, 5:37pm, Lee dB.
Online exams are new territory for me, and one thing I've been wondering about is whether the fact the exam is online changes the expectation around the length of our answers, given I suspect many of us can type faster than we can handwrite these days?...

UWA week 23 - 1st semester, study break

photo Re: Bash vs Other Programming Languages (eg Python or C) (all 4)
Sun 7th Jun, 4:00pm, Lee dB.
This is something I've been reflecting on myself through the course of the unit and I think it's a good question. I'm quite fond of Python as a programming language for a number of reasons. On the other hand, Bash and shells are something I've previously...
photo Re: Returning Multiple Values: string manipulation vs global variables vs alternatives. (all 6)
Mon 1st Jun, 9:23am, Lee dB.  O.P.
Hi Chris, Yes, I was referring to external processes, as well as the creation of subshells. Is my understanding correct that both of these Involve forks (at least on Unix & Linux)? Thanks! Lee

UWA week 22 - 1st semester, week 12

photo Re: The time of releasing mark of Assignment 1 (all 10)
Wed 27th May, 3:56pm, Lee dB.
Hi Chris, Appreciate the update. Is there any chance you can share any general observations we can incorporate into our next project? Thanks, Lee
photo Re: Returning Multiple Values: string manipulation vs global variables vs alternatives. (all 6)
Tue 26th May, 1:49pm, Lee dB.  O.P.
Thanks Chris, that's the approach I've ended up taking. It just seemed wasteful concatenating variables into strings, then deconstructing them again in the receiver, particularly where forks are involved.
photo Re: Clarifications for Assignment 2 (all 41)
Tue 26th May, 8:55am, Lee dB.
Thanks Chris -- that's very helpful and I feel like I'm on the right track! It seems like there's a bit to learn in terms of writing idiomatic shell scripts.
photo Re: Clarifications for Assignment 2 (all 41)
Mon 25th May, 7:08pm, Lee dB.
Hi Chris, It certainly does, and I think the functional requirements are very clear. Sorry if there's been an excess of questions. What I'm finding challenging though is implementing it cleanly -- it feels like it's easy for small, incremental changes...
photo Re: Clarifications for Assignment 2 (all 41)
Mon 25th May, 1:56pm, Lee dB.
Hmmm, I'm not convinced there's anything particularly elegant about my approach, design, or implementation, but having an idea of what we are expected to potentially build in might lead to some code refactoring...
photo Returning Multiple Values: string manipulation vs global variables vs alternatives. (all 6)
Mon 25th May, 12:09pm, Lee dB.
Hi everyone, I'm looking at how to better structure the shell scripts for my project, and one thing I've found challenging is how to best pass multiple values between functions. One way I've used is to concatenate the multiple values together, echo them...
photo Re: Clarifications for Assignment 2 (all 41)
Mon 25th May, 8:59am, Lee dB.
Regarding the time taken to transfer between platforms and stations. The transfers.txt file details the time taken to transfer between some stops within a station, but doesn’t seem to contain details on transfer times between stations (for example,...
photo Re: The direction for Q3 (all 6)
Mon 25th May, 8:54am, Lee dB.
Stop_times.txt contains a stop_sequence number by trip_id that can be used to determine the order of stops for a given route. This is what I used to determine the direction. As far as I know, the direction_id flag in trips.txt is really for display purposes...
photo Re: assigment2 Q3 about time (all 7)
Mon 25th May, 8:49am, Lee dB.
The transfers.txt file contains details around how long it takes to transfer between different parts of a station, for example to walk between platforms. It doesn’t necessarily contain all the stops in stops.txt.

UWA week 21 - 1st semester, week 11

photo Re: Clarifications for Assignment 2 (all 41)
Fri 22nd May, 6:21pm, Lee dB.
Hi Jordan, The link on the assignment webpage to the Google specs describes most of these pretty well. My interpretation is as follows: Exception Type: 1 - Service has been added for the specified date. 2 - Service has been removed for the specified date....
photo Re: Clarifications for Assignment 2 (all 41)
Fri 22nd May, 3:40pm, Lee dB.
Thanks David, that was my assumption too - thanks for clarifying. :)
photo Re: Lecture recording on may 14 (all 6)
Fri 22nd May, 1:46pm, Lee dB.
Ah, that's interesting. I had wondered if having the shell scripts as standalone files would also more easily permit some type of race condition exploit, where the contents of the files could be changed in between having their contents verified, and being...
photo Re: Clarifications for Assignment 2 (all 41)
Fri 22nd May, 12:12pm, Lee dB.
Not sure if this has been answered already (apologies if so), but for Question 3, is it correct to assume that we need to consider the calendar of services and Service exceptions when formulating our route, based on the date and day the script is run?...
photo Re: Lecture recording on may 14 (all 6)
Fri 22nd May, 11:58am, Lee dB.
Interestingly, Examplify uses lots of small shell scripts on Mac to go through and disable services, change firewall rules and so forth, then (mostly) reverse the process. From a security perspective, it would be interesting to see if the integrity of...
photo Re: sed changing rw to r permissions on files in WSL (all 7)
Fri 22nd May, 8:29am, Lee dB.
As far as I know, the -i flag in sed works by writing the modified stream to a temporary file, then replacing the original file with the temporary file. I don’t know if this is done by overwriting the contents of the existing file, or replacing the...
photo Re: Error installing Make in Ubuntu Win 10 (all 6)
Thu 21st May, 3:50pm, Lee dB.
Great to hear you got it working!
photo Re: The time of releasing mark of Assignment 1 (all 10)
Thu 21st May, 9:20am, Lee dB.
Thanks Chris! I was a bit concerned that maybe I'd missed the published marks, as csmarks doesn't (yet) show me as being enrolled in this unit. Appreciate you letting us know.
photo Re: Error installing Make in Ubuntu Win 10 (all 6)
Wed 20th May, 8:05pm, Lee dB.
Definitely looks an issue with DNS name resolution. I don’t know much about WSL and how it implements networking, but I would start by checking out /etc/resolv.conf and /etc/wsl.conf to see if everything looks reasonable there. You’re not using a...
photo Re: Error installing Make in Ubuntu Win 10 (all 6)
Wed 20th May, 9:45am, Lee dB.
Looks like a network issue: can you ping archive.ubuntu.com from within the WSL environment? It looks to be reachable from my machine.
photo Re: The time of releasing mark of Assignment 1 (all 10)
Tue 19th May, 5:31pm, Lee dB.
Hi Chris, Just wondering if there's any chance you can provide an update on the release of Assignment 1 marks? It would be great to have some feedback that we can take on board for the completion of Assignment 2 :) Thanks, Lee
photo Re: Microsoft President: We Were 'On the Wrong Side of History' About Open Source (all 3)
Mon 18th May, 9:51pm, Lee dB.
It's been really interesting watching Microsoft's transformation over the past decade in particular, and how central open source has been to that transformation. It seems to be that at least half of the services in Azure seem to be at least somewhat based...

UWA week 20 - 1st semester, week 10

photo Re: Assignement 2, Q1 Assumption (all 5)
Sat 16th May, 8:10pm, Lee dB.  O.P.
Let’s just say that I’m very grateful for the fact that this unit isn’t having assessment conducted and automatically marked by the Blackboard LMS. At least if a question in the assignment here is ambiguous or open to interpretation, we have the...
photo Re: Assignement 2, Q1 Assumption (all 5)
Sat 16th May, 9:25am, Lee dB.  O.P.
Thanks Chris, that’s really clear. I only ask because not all units are as forgiving with regards to assumptions ;)
photo Assignement 2, Q1 Assumption (all 5)
Fri 15th May, 4:39pm, Lee dB.
Hi Chris, For the first part of the assignment, can we safely assume that the version comment will appear only once at the top of each file, or do we need to account for the fact that it may appear anywhere in the file? Also, do we need to account for the...
photo Re: Assignment 2: Permissible Software (all 4)
Mon 11th May, 2:26pm, Lee dB.  O.P.
Thanks for the detailed and helpful reply, Chris. I really appreciate it and what you're saying makes sense. I only mention Perl specifically as it seems like it was an early evolution of sh, awk and sed. From wikipedia: and sed" So in the case of the assignment,...

UWA week 19 - 1st semester, week 9

photo Assignment 2: Permissible Software (all 4)
Fri 8th May, 9:25pm, Lee dB.
Hi Chris, For assignment 2, are there any restrictions on the software out shell script is permitted to use? For example, could we extend haversine.c To add functionality, or call Perl or Python scripts? I’ve been curious to ask: in the context of shell...
photo Re: RegEx tool to help you write gibberish (both)
Mon 4th May, 1:15pm, Lee dB.
Thanks for sharing! Regex is definitely an example of a write-one, read-never language ;) One approach I sometimes find useful (not sure if it's been covered in lectures) is to use the "free spacing" (?x) option that some Regex implementations have. This...

UWA week 17 - 1st semester, week 7

photo Re: resolution of recorded lectures is too low (all 3)
Fri 24th Apr, 4:44pm, Lee dB.
Hmm, I just downloaded the 1080p MP4 from Echo360, and it clocks in at 130MB and seems pretty readable. The Web Player often defaults to a 480p version that is hard to read, but that can be changed through the Echo 360 player settings for those that aren't...

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

photo Re: Assignment 1 Task 1 quick question (all 6)
Fri 17th Apr, 8:55am, Lee dB.
I’ve been debating myself whether to validate or not, and have tended towards only performing minimal validation, and relying on utilities like date to perform the validation and trapping any errors. I’m not sure if this is the right approach (and...
photo Re: Question 3: Should we ignore casing ? (all 5)
Wed 15th Apr, 7:40pm, Lee dB.
Hi Chris, Just letting you know that I'm having issues with these links using Firefox on Linux - they're all pointing to https://. Interestingly, the quoted text above includes the link to the https URL, which presumably is generated server-side?
photo Testing Assignment on Lab Machines (both)
Mon 13th Apr, 10:33pm, Lee dB.
Hi everyone, I may have missed this in the lectures, but is there a way to test our assignment on the lab machines remotely? I've written my assignment on a combination of macOS (both with BSD utilities and GNU coreutils) and Debian Linux, but there are...
photo Re: A number of free Linux ebooks (if you're quick) (both)
Mon 13th Apr, 4:29pm, Lee dB.
Thanks, Chris -- managed to snag "Linux for Beginners".
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020