0% found this document useful (0 votes)
41 views2 pages

Lab 05 - Dropbox Questions

The document contains questions from a lab assignment asking the student to provide details about permissions for a script called "myscript.sh" after running the chmod command on it. The student is also asked to attach screenshots showing their name in the Ubuntu server window, output from running scripts, and the last activity script output along with their user prompt. They are asked to explain what the last activity script does in their own words. The document emphasizes that lab questions must be submitted to Dropbox before midnight on the day of the lab or a mark of zero will be received.

Uploaded by

Preet Dhillon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Lab 05 - Dropbox Questions

The document contains questions from a lab assignment asking the student to provide details about permissions for a script called "myscript.sh" after running the chmod command on it. The student is also asked to attach screenshots showing their name in the Ubuntu server window, output from running scripts, and the last activity script output along with their user prompt. They are asked to explain what the last activity script does in their own words. The document emphasizes that lab questions must be submitted to Dropbox before midnight on the day of the lab or a mark of zero will be received.

Uploaded by

Preet Dhillon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab 05 – Questions for Dropbox

Navpreet Kaur
Student:

10270950
Student ID:

Section: 2

Please provide detailed answers to the following questions IN YOUR OWN WORDS. Do
NOT copy/paste from the internet, the lab itself, or from each other!

• I have “chmod’ed” the file “myscript. sh” with the command chmod 644
myscript. sh
• What permissions does ‘myscript. sh’ now have?
Ans- The user and group own the 'myscript. sh' as the file can be viewed and read by the
user and this file can also be seen by anybody else.
• Which permission “group” gets priority?
Ans- The priority of reading can be assessed by groups
• When I type ./myscript.sh will my script run? Why or why not?
Ans- The content does not have permission to be used therefore it will not run or execute.

• Attach a screenshot that clearly shows:


• Your name at the top of the Ubuntu Server VM window
• the output from your input.sh script with numbers OTHER THAN 5 and 4 (replace
the example below)

• You’ve written a script in Linux. WITHOUT actually running it, how else can you
tell if it will run or not? List 2 different ways.
Ans- 1 Method - Bash can validate a script's syntactical validity without running it when
we use the -n option.
2 Method - Another choice is to organize ypur code into functions. You can then run
your code and then check your syntax mistakes.
• Attach a screenshot that clearly shows:
• Your name at the top of the Ubuntu Server VM window
• The (combined) output from the cat contacts.txt and find <value> commands
from Part D (replace the example below)

• Attach a screenshot of your Linux VM window (just the VM window – not the whole
desktop!) that clearly shows:
• Your name at the top of the Ubuntu Server VM window
• All of the visible output from the “LAST ACTIVITY” script
• Your user prompt at the bottom – replace the example below (and make sure I’m
able to read it!)

• Explain, in your own words, what this script does.


Ans- It will be stopped by pressing cntrl+c as it starts to play infinite loop.
Lab questions must be submitted to Dropbox before midnight (EST) on the day of your lab

Labs submitted late receive a mark of ZERO. No exceptions.

You might also like