NOTE: I just need the answer for question 5 and 6. I already knew the question 1-4, and wrote down all the requirements for clarification.
In this assignment, you are required to write a Bash script, call it assignment2.sh. Your Bash script has to accept at least four input arguments, and must:
1) Print to the user a set of instructions explaining how the PATH variable can be used in Bash.
2) Save the manual of the 'awk' command in the file /tmp/help.txt.
3) Shut down your Ubuntu box at 2 o'clock tonight.
4) Store your name and your partner's name in a text file inside your home directory. The name of the file must have the following format: ite404-<date>.txt, where <date> is the current date; e.g. ite404-2020-10-26.txt.
5) Get the input arguments and print them. After that, create four other scripts to print the first four words, respectively. For example, if the user inputs 'HELLO FROM AUIS UNI', then the first generated script must print the word 'HELLO', the second script must print 'FROM', and so forth.
6) Download Ubuntu 20.04 and store on a USB memory stick, which must act as a bootable DVD.
NOTE: I just need the answer for question 5 and 6. I already knew the question 1-4, and wrote down all the requirements for clarification.
As mentioned in the quesution this
solution to Quesion 5:
assignment2.sh
#!bash.sh
input=$1
echo $input
a=( $input )
cat > script1.sh << EOF1
echo "${a[0]}"
EOF1
cat > script2.sh << EOF1
echo "${a[1]}"
EOF1
cat > script3.sh << EOF1
echo "${a[2]}"
EOF1
cat > script4.sh << EOF1
echo "${a[3]}"
EOF1
----------------------------------------------------------------------------------------------------
Steps to run
above script:
Lenovo@DESKTOP-ILNTL2L MINGW64 ~/Downloads
$ ./assignment2.sh 'Tmaway mata chapita tumi
bandhu'
Tmaway mata chapita tumi bandhu
Lenovo@DESKTOP-ILNTL2L MINGW64 ~/Downloads
$ ./script1.sh
Tmaway
Lenovo@DESKTOP-ILNTL2L MINGW64 ~/Downloads
$ ./script2.sh
mata
Lenovo@DESKTOP-ILNTL2L MINGW64 ~/Downloads
$ ./script3.sh
chapita
Lenovo@DESKTOP-ILNTL2L MINGW64 ~/Downloads
$ ./script4.sh
tumi
Solution Question 6 :
It needs downloading of the software to a hardware device.It needs physical prescence.
Get Answers For Free
Most questions answered within 1 hours.