It's UWAweek 25 (mid-year break)

helpOSTS

This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting.

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.

How do I ask a good question?
Displaying the 6 articles in this topic
Showing 6 of 439 articles.
Currently 9 other people reading this forum.


 UWA week 16 (1st semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
8:52pm Tue 16th Apr, ANONYMOUS

Hello Professor. I'm a little confused about the Sample Queries in Assignment 1. The format of the Sample Queries given in Assignment 1 is tobacco_nation WHO_tobacco_control_tonly.csv JPN Male" I've now done my job, but I need to type tobacco_nation.sh WHO_tobacco_control_tonly.csv JPN Male to get the result. I'd like to ask if both "tobacco_nation" and "tobacco_nation.sh" can be scored. Or do I need to write another script, which modify the permissions via chmod, and then modify the PATH so that the file can be used without " .sh " suffix, is this what is included in this Assignment?


SVG not supported

Login to reply

👍?
helpful
9:10pm Tue 16th Apr, ANONYMOUS

Are you on Windows or Mac? I don't have the file extension problem like you, and I don't see how does the problem relate to $PATH. As long as I write '#!/usr/bin/env bash' as the first line, and grant the executable permission, I could execute the script no matter how it is named. By the way ZIP archives are capable of storing file permissions.


SVG not supported

Login to reply

👍?
helpful
9:15pm Tue 16th Apr, ANONYMOUS

I use Windows, and now I've solved the problem with extensions, but thank you very much for your reply. By the way, do you mean that script files that have changed permissions are directly zipped, and the permissions are still maintained on the part of the automated testing software?


SVG not supported

Login to reply

👍x1
helpful
9:29pm Tue 16th Apr, ANONYMOUS

https://unix.stackexchange.com/questions/313656/preserving-permissions-while-zipping Info-ZIP supports file permissions. And `zip` and `unzip` command on Linux are mostly Info-ZIP. So yeah, if you zip the file with appropriate permissions set, it should unzip into a file with the same permissions too. I guess the professor will take care of the permissions anyway. Perhaps there is no point for our students to worry about it.


SVG not supported

Login to reply

👍?
helpful
8:05pm Wed 17th Apr, Michael W.

ANONYMOUS wrote:
> Hello Professor. > I'm a little confused about the Sample Queries in Assignment 1. > The format of the Sample Queries given in Assignment 1 is > tobacco_nation WHO_tobacco_control_tonly.csv JPN Male" > > I've now done my job, but I need to type > tobacco_nation.sh WHO_tobacco_control_tonly.csv JPN Male > to get the result. > > I'd like to ask if both "tobacco_nation" and "tobacco_nation.sh" can be scored. > Or do I need to write another script, which modify the permissions via chmod, and then modify the PATH so that the file can be used without " .sh " suffix, is this what is included in this Assignment?
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 tobacco_nation.sh Secondly, you do not need to call chmod or do anything with the PATH variable; the testing system will do it all, so that it's done in a consistent way. Cheers MichaelW 👨‍🎨


SVG not supported

Login to reply

👍?
helpful
8:20pm Wed 17th Apr, Michael W.

ANONYMOUS wrote:
> I use Windows, and now I've solved the problem with extensions, but thank you very much for your reply. > By the way, do you mean that script files that have changed permissions are directly zipped, and the permissions are still maintained on the part of the automated testing software?
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 UniApps. If you have done this under Windows (I assume Windows Subsystem for Linux), it it quite possible that things may not work elsewhere. As for submission, put the script into a directory, and then either zip, or gzip the directory. It is the zip or gzip file that I am expecting. Cheers MichaelW

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy