0% found this document useful (0 votes)
24 views

Class Assignment01

This document provides instructions for an assignment involving setting up a Bitbucket repository and writing shell scripts. Students are to create a Bitbucket repository called CPS5401Codes-username and grant the instructor and TA read access. They are then to clone the repository locally and create a subdirectory to hold assignment work. The document describes how to add, commit, and push changes. It also explains two shell script tasks - one to create a new directory if it doesn't exist, and another to check if a directory exists before creating it.

Uploaded by

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

Class Assignment01

This document provides instructions for an assignment involving setting up a Bitbucket repository and writing shell scripts. Students are to create a Bitbucket repository called CPS5401Codes-username and grant the instructor and TA read access. They are then to clone the repository locally and create a subdirectory to hold assignment work. The document describes how to add, commit, and push changes. It also explains two shell script tasks - one to create a new directory if it doesn't exist, and another to check if a directory exists before creating it.

Uploaded by

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

Natasha S. Sharma.

PhD
CPS 5401: Class Activity 1 2022-09-14
Bitbucket Repository Setup and Shell Scripts

This assignment has to be completed independently during the class time. You may consult the Internet
and/or the instructor during the class session. Deadline: 6:30 pm, September 14th 2022.

1 Bitbucket Repository Setup [50 pts]


Create a repository in your Bitbucket account called CPS5401Codes-username, where username is something
that helps the TA and the instructor to distinguish you from the others, such as your UTEP account name.

1. In Bitbucket repository settings, grant the instructor (search for nssharma@utep.edu) and the TA (search
for atwumasi@miners.utep.edu) the read privilege. This will be the repository where you will submit
your codes from here on forth.
2. Make a clone of the Bitbucket repository on your local machine.

3. On your local machine, go inside the cloned directory, and create a sub-directory called class-091422.
Put all required work for this assignment in this sub-directory.
3. Commands to add, commit and push:
$ git add class-091422

$ git commit -m "relevant message"


$ git push origin
You can try as many times to modify the submission before the deadline.
The TA and the instructor will only retrieve the work from Bitbucket repositories; no other form of submission
(including via email) is accepted.
Make sure that you have your Bitbucket account setup properly ahead of time.
No extension will be made in any circumstances, even if the reason is a last-minute power outage or network
disruption.

2 Shell Script Tasks [50 pts]


This question has two parts. Attempt both parts to receive full credit.

2.1 Make Directory Task [25 pts]


Write a shell script that uses the Bash command ‘mkdir’ to create a new directory. Name this shell script
‘make directory.sh’ and add the following code to take a new directory name from the user. If the directory
name is not exist in the current location then it will create the directory, otherwise the program will display
error.
Your output should look like:
2.2 Directory Exist Task [25 pts]
If you want to check the existence of directory in the current location before executing the ‘mkdir’ command
then you can use the following lines of code where, ‘-d’ option is used to test a particular directory is exist or
not.

Write a shell script ‘directory exist.sh’ that checks the existence of a directory in the current location and
creates the directory if it is missing or prints Directory exists to the screen if it exists.

Your output should look like:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy