QUESTION 1: A Project Setup Script Software developers use scripting to support good software engineering practices. For this question we will explore a standard way that software developers organize their home directory when writing software. Write a script called: mkproj ARGUMENT OWNER Example: ./mkproj Ass2 johnsmith Where: The script's name is mkproj ARGUMENT is the name of the software project the developer wants to initialize. OWNER is the username of the person whom the project belongs to. Use vi to create the script. The script must do the following in the order presented: 1. Make sure the script is running in Bash 2. If the user did not provide the correct number of arguments, then display the following error message and then terminate the script: "Error: Wrong number of arguments. Please type ./mkproj ARGUMENT OWNER. The argument is the name of the project. The OWNER is the user name the project belongs to." · · 3. If the directory "Projects" does not exist, then the script creates that directory. If the directory already exists, then nothing is done. 4. Change the working directory to Projects 5. If the directory ARGUMENT (i.e. the project name) already exists within the directory Projects, then terminate the script with the following error and change directory to the parent directory (where we came from): "Error: The project name has already been used. Please select another project name and try again." 6. Create the directory ARGUMENT (i.e. the project name). 7. Change the current directory to the directory ARGUMENT (i.e. the project name) 8. Create the subdirectories: archive, docs, source. Then use the 1s command to display them as verification to the user. 9. Create a readme.txt file in the docs directory with the following default information: "Created by:" and then insert the OWNER name. Display the file as verification to the user.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
QUESTION 1: A Project Setup Script
Software developers use scripting to support good software engineering practices. For
this question we will explore a standard way that software developers organize their
home directory when writing software.
Write a script called: mkproj ARGUMENT OWNER
Example: ./mkproj Ass2 johnsmith
Where:
The script's name is mkproj
ARGUMENT is the name of the software project the developer wants to initialize.
OWNER is the username of the person whom the project belongs to.
Use vi to create the script.
The script must do the following in the order presented:
1. Make sure the script is running in Bash
●
2.
If the user did not provide the correct number of arguments, then display the
following error message and then terminate the script: "Error: Wrong number of
arguments. Please type ./mkproj ARGUMENT OWNER. The argument is the
name of the project. The OWNER is the user name the project belongs to.
,,
3. If the directory “Projects” does not exist, then the script creates that directory. If
the directory already exists, then nothing is done.
4. Change the working directory to Projects
5. If the directory ARGUMENT (i.e. the project name) already exists within the
directory Projects, then terminate the script with the following error and change
directory to the parent directory (where we came from): "Error: The project name
has already been used. Please select another project name and try again."
6.
Create the directory ARGUMENT (i.e. the project name).
7. Change the current directory to the directory ARGUMENT (i.e. the project name)
8. Create the subdirectories: archive, docs, source. Then use the 1s command to
display them as verification to the user.
9. Create a readme.txt file in the docs directory with the following default
information: "Created by:" and then insert the OWNER name. Display the file as
verification to the user.
Transcribed Image Text:QUESTION 1: A Project Setup Script Software developers use scripting to support good software engineering practices. For this question we will explore a standard way that software developers organize their home directory when writing software. Write a script called: mkproj ARGUMENT OWNER Example: ./mkproj Ass2 johnsmith Where: The script's name is mkproj ARGUMENT is the name of the software project the developer wants to initialize. OWNER is the username of the person whom the project belongs to. Use vi to create the script. The script must do the following in the order presented: 1. Make sure the script is running in Bash ● 2. If the user did not provide the correct number of arguments, then display the following error message and then terminate the script: "Error: Wrong number of arguments. Please type ./mkproj ARGUMENT OWNER. The argument is the name of the project. The OWNER is the user name the project belongs to. ,, 3. If the directory “Projects” does not exist, then the script creates that directory. If the directory already exists, then nothing is done. 4. Change the working directory to Projects 5. If the directory ARGUMENT (i.e. the project name) already exists within the directory Projects, then terminate the script with the following error and change directory to the parent directory (where we came from): "Error: The project name has already been used. Please select another project name and try again." 6. Create the directory ARGUMENT (i.e. the project name). 7. Change the current directory to the directory ARGUMENT (i.e. the project name) 8. Create the subdirectories: archive, docs, source. Then use the 1s command to display them as verification to the user. 9. Create a readme.txt file in the docs directory with the following default information: "Created by:" and then insert the OWNER name. Display the file as verification to the user.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Analysis of Performance Measurement
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage