Highlights
Objectives :
1. Develop CLI/Shell and vi skills.
2. Explore positional arguments and parameter expansion.
Exercise :
1. Login to your server vm using ssh login. Do not use a tty session !
2. Launch tmux , maximize it and split into two vertical panes. Use LHS to write the script and RHS to execute it.
3. Write a shell script 300123456-a3.sh to perform the following :
3.1. 05pts. Use command substitution to pass the current working directory in $1 .
3.2. 05pts. Exit with return code 2 immediately if the number of arguments passed is zero.
3.3. 05pts. Create an empty file samplefile if it does not exist in current working directory.
3.4. 05pts. Store the absolute path to samplefile in a variable _SFILE using $1 and the filename.
3.5. 05pts. Use parameter expansion to extract the filename samplefile from _SFILE .
Hint :
Remove all characters as longest matching pattern from the start of the absolute path.
3.6. 05pts. Use parameter expansion to extract the path info in _SFILE by removing the filename from the end.
3.7. 05pts. Print 3.5 and 3.6 in a single echo statement and exit with 0.
3.8. 05pts. Print the contents of your script with line numbers.
4. All your coursework must comply with submission guidelines to be accepted.
This COMP306 - IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.