{"id":17452,"date":"2024-03-24T08:25:53","date_gmt":"2024-03-24T08:25:53","guid":{"rendered":"https:\/\/www.writemyessays.app\/blog\/questions\/scripting-languages-assignment-a-bash-script-and-a-simple-explanation-of-the-code-not-more-than-220-words\/"},"modified":"2024-03-24T08:25:53","modified_gmt":"2024-03-24T08:25:53","slug":"scripting-languages-assignment-a-bash-script-and-a-simple-explanation-of-the-code-not-more-than-220-words","status":"publish","type":"questions","link":"https:\/\/www.writemyessays.app\/blog\/questions\/scripting-languages-assignment-a-bash-script-and-a-simple-explanation-of-the-code-not-more-than-220-words\/","title":{"rendered":"Scripting Languages Assignment (a bash script and a simple explanation of the code not more than 220 words)"},"content":{"rendered":"<div><span style=\"font-size: 14px; cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">It&#8217;s a bash script and a simple explanation of the code not more than 220 words.<\/span><br \/><\/span><\/div>\n<p><span style=\"font-size: 14px; cursor: auto; color: inherit;\"><\/p>\n<div><span style=\"font-size: 14px; cursor: auto; color: inherit;\"><br \/><\/span><\/div>\n<p>Scripting Languages Assignment 2.1: Portfolio 1 ASSIGNMENT BRIEF Important points before you begin: \u2022 Read this brief very carefully in full, and at the earliest opportunity \u2022 If any of this brief\u2019s stipulations are unclear to you, it is your responsibility to seek timely clarification from the lecturer\/unit coordinator well before the assessment\u2019s due date \u2022 Be aware that if you misinterpret this assignment brief, either in part or in full, this misinterpretation will not be accepted as grounds for an appeal of the result you receive Overview In this assignment you will be required to write a script that demonstrates the extent to which you have understood the shell script (bash) commands, programmatic techniques and concepts addressed in Modules 1 to 5 inclusive. This assignment is worth 20% (20 marks) of your unit grade and its completion will help you build a subset of the skills you will require to successfully complete Portfolio 2 and Assignment 3. Your Academic Integrity Obligations Your tutor, lecturer, and unit coordinator all take Academic Integrity very seriously and it cannot be stressed strongly enough how important it is that you fully understand your academic integrity obligations as a student of the University. In regard to all of this unit&#8217;s assessments, all suspected instances of academic misconduct will be reported for investigation, which may result in substantial academic penalties for those concerned. If you are unfamiliar with the University&#8217;s Academic Integrity Policy as it applies to all assignments you submit for this unit<\/span><\/p>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\">AI Tool Utilisation Whereas AI tools can serve as a very useful tool in the software engineering workplace, they are not to be used to complete any of the assessments in this unit, either in-part or in totality. This is because the focus of this unit is the development of authentic knowledge of, and skill in applying, various scripting languages to achieve specific outcomes, and not the use of AI tools to act on a programmer&#8217;s behalf. This acquisition of authentic knowledge extends beyond the outcomes of this unit and is important to a student\u2019s future ability to be successful in obtaining a Work Integrated Learning placement, and ultimately, a job in industry. Employers already use AI tools extensively and know what they can and cannot do \u2013 they see no value in hiring graduates whose demonstrable skills do not exceed that of existing AI tools. Additionally, students suspected of representing AI output as their own work may be called upon to demonstrate functional knowledge of this work, which, if not forthcoming, may in turn lead to allegations of academic misconduct.<\/div>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\">General Assignment Requirements \u25aa Your script will be run\/assessed in the Azure Linux VM provided at the beginning of semester. It is expected that you will develop and test your script in this Azure environment to ensure full compatibility. \u25aa Your script must be a bash script and nothing else, i.e. the shebang line used is #!\/bin\/bash. Scripts of any other type, e.g. #!\/bin\/sh will receive a grade of zero (0). \u25aa Ensure the script you write is fully self-contained and is not configured to be dependent on external files, libraries or resources to run. Non-observance of this requirement may cause your script to run incorrectly or not at all. \u25aa Carefully check your submission before uploading it to Canvas. What you submit is what gets assessed! If you make a submission error, e.g. submit a wrong file, an empty .zip archive etc, no further\/subsequent submissions will be accepted, which may result in a substantial loss of marks, or even a zero (0) result in some cases. \u25aa You must only submit a single shell script (.sh) file named parsechars.sh contained within a .zip file with the stipulated name in any individual upload action. Do not upload multiple files\/zip archives in the same upload action as all will be considered invalid and will not be assessed. Also note that only the most recent individual submission made (as determined by the timestamp Canvas allocates) will be assessed. \u25aa If your script does not run for any reason, e.g. hard-coding of files\/directories\/paths, use of a development environment not compatible with the Azure Linux VM provided at the beginning of semester, only a partial mark may be awarded on a code-readthrough basis at the assessor\u2019s discretion. Your assessor will not fix non-functional, dysfunctional or incompatible scripts. Page 3 of 6<\/div>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\">Task \u2013 Parse Characters (20 marks) Write a bash script that processes a list of strings contained in an external text file, and for each string in the list, parses out characters that are allowed characters from those characters that are disallowed, printing a report to the screen of total [T], allowed [A] and disallowed [D] characters found, and their counts. Only the following characters are allowed: \u2022 Uppercase vowels \u2022 Even numbers within the range 0-9 \u2022 The following subset of special characters: &amp;#!$- All other characters are disallowed. Task Constraints \u2022 You may only use commands, utilities and programmatic techniques addressed in Lectures 1-5 inclusive \u2022 Ensure your script includes appropriate use of: o IFS management when reading external files o BRE and\/or ERE to classify each string\u2019s individual characters correctly o The cut command to isolate each string\u2019s individual characters for regex matching o Indexed arrays to store sorted characters for final display to the terminal o Loop structures to handle user input and external file processing o Control structures for decision-making, i.e. if-else statements o Command flags as required o Piping as required o Command substitution as required Required Script Functionality \u25aa When your script is run, it is to prompt the user for the name of a file in their current working directory. \u25aa If the file name provided does not exist in the user\u2019s current working directory, or if it does exist but contains no data (is empty), the user is to be accurate informed of what the error is and then reprompted for a valid file that contains data. The re-prompting process must not involve the script terminating then restarting. \u25aa If the file name entered by the user does exist and does contain data, your script is to process each of the strings it contains and parse out its allowed and disallowed characters, with the results reported to the screen precisely as shown in the screenshot below. \u25aa Also ensure the user can exit the script at the prompt if they wish to by entering -q<br style=\"cursor: auto; color: inherit;\"><\/div>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\">Other Compulsory Requirements \u25aa Call the script parsechars.sh. \u25aa Your full name and student number must be placed at the top of your script (as comments) immediately after the shebang line. \u25aa Immediately after your name and student number, provide an explanation of no more than 220 words that articulates your thinking in regard to how you approached the design and construction of your script to solve for the stipulated task. Be sure to provide a rationale for the way in which you have utilised the commands, utilities and programmatic techniques your script employs, and the role each serves in the context of the script\u2019s overall functionality. This statement is of course to take the form of comments. Please split the statement over multiple lines for easy readability. [IMPORTANT NOTE: AI-generated explanations will receive a mark of zero (0) in this part of the rubric] \u25aa To construct your script, use a carefully considered combination of commands, utilities and programmatic techniques sourced from Lectures 1-5 inclusive) including those listed in the Task Constraints section above. Do not use bash\/shell script commands, utilities and programmatic techniques not addressed in Lectures 1-5 inclusive as this will result in a lower mark (see rubric for details). \u25aa Your script must contain concise \u2018in-situ\u2019 comments that accurately explain all of the code elements it contains in your own words. Note: Comments that are not relevant and accurate in regard to the code they describe, or a complete lack of comments, will not only attract a lower marks, but may be viewed as suggestive of possible academic misconduct. [IMPORTANT NOTE: AI-generated comments will receive a mark of zero (0) in this section of the rubric] \u25aa Any temporary files and\/or folders created by your script in the course of its execution must be programmatically removed from the assessor\u2019s system when the script terminates. \u25aa The efficiency and correctness with which the commands, utilities and programmatic techniques within your script have been utilised will also form part of your mark, so please pay close attention to this aspect of your code as well. For example, your parsechars.sh script is expected to make use of appropriately selected and correctly applied commands\/options, including everything listed in the Task Constraints section above. The total lines-of-code your script employs will also be considered, with deductions applicable should this significantly exceed the total deemed necessary to achieve the stipulated outcomes. \u25aa To assist you in the development and testing of your script, you have been provided with three (3) test files named rpl1.txt, rpl2.txt, and rpl3.txt, each of which contains a list of random strings of varying lengths and character combinations. Important Note: Your assessor will not use any of these test files for the marking process so do not hard code any of them into your script. Your assessor will use a different set of test files (.txt) files, that have different names and that contain different lists of random strings. Also note that the space character may also be present in the strings your assessor uses, which need to be treated just like any other character, so make sure your bash script allows for this.<br style=\"cursor: auto; color: inherit;\"><\/div>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\"><span style=\"font-size: 16px; cursor: auto; color: inherit;\">In this assignment you are required to write a script that demonstrates the extent to which you have understood the shell script concepts and practices addressed in Modules 1 to 5 inclusive. This assignment is worth<span style=\"cursor: auto; color: inherit;\">&nbsp;<\/span><\/span><span style=\"font-size: 16px; cursor: auto; color: inherit;\">20%<\/span><span style=\"font-size: 16px; cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">&nbsp;<\/span>(20 marks) of your unit grade and its completion will help you build skills required for the assignments to follow. The full assignment brief is available in the<span style=\"cursor: auto; color: inherit;\">&nbsp;<\/span><\/span><em style=\"font-size: 16px; cursor: auto; color: inherit;\">Required Files<\/em><span style=\"font-size: 16px; cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">&nbsp;<\/span>section above<\/span><br style=\"cursor: auto; color: inherit;\"><\/div>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\"><span style=\"font-size: 16px; cursor: auto; color: inherit;\"><br style=\"cursor: auto; color: inherit;\"><\/span><\/div>\n<div style=\"font-size: 14px; cursor: auto; color: inherit;\"><span style=\"font-size: 16px; cursor: auto; color: inherit;\">Read through and let me know if you need any more information.<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s a bash script and a simple explanation of the code not more than 220 words. Scripting Languages Assignment 2.1: Portfolio 1 ASSIGNMENT BRIEF Important points before you begin: \u2022 Read this brief very carefully in full, and at the earliest opportunity \u2022 If any of this brief\u2019s stipulations are unclear to you, it is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"disciplines":[63],"paper_types":[],"tagged":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/questions\/17452"}],"collection":[{"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/questions"}],"about":[{"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/types\/questions"}],"author":[{"embeddable":true,"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/comments?post=17452"}],"version-history":[{"count":0,"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/questions\/17452\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/media?parent=17452"}],"wp:term":[{"taxonomy":"disciplines","embeddable":true,"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/disciplines?post=17452"},{"taxonomy":"paper_types","embeddable":true,"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/paper_types?post=17452"},{"taxonomy":"tagged","embeddable":true,"href":"https:\/\/www.writemyessays.app\/blog\/wp-json\/wp\/v2\/tagged?post=17452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}