Microsoft Word XXXXXXXXXXAssignment #4.doc Assignment #4 (80 Points) – COSC 4327 – Dr. Leonard Brown Due: November 20, 2019 Problem Description Your task is to create a shell script application called...

1 answer below »
It's my assignment please let me know how you can help me


Microsoft Word - 4327 Assignment #4.doc Assignment #4 (80 Points) – COSC 4327 – Dr. Leonard Brown Due: November 20, 2019 Problem Description Your task is to create a shell script application called todo that the user can use to maintain a task list. The user should be able to create a new task list or update an existing task list. The script should be able to run with and without an argument. If an argument is passed to the script, it should use that argument as the file name for the task list. If there is already a task list saved with that file name, it should be opened so that the user can maintain it. If there is no task list saved with that file name, the script should create a new list for the user. If the script is executed without an argument, the script should input a file name from the user. Again the file name may be a new name or an existing one. Note that the application should automatically append a suffix to the user’s file name. This suffix should be .todo. The user should never have to enter or refer to the suffix. So, a user may create a task list called “project1”, and the list should be stored in a file called project1.todo. To access the list, the user only needs to enter the text “project1”. Once the title is resolved, the system should display a “splash screen”. This screen should clear the screen and show the title of your application. This screen should be visually interesting. It should remain on the screen until the user presses the Enter key. After the splash screen, the application should enter a menu mode and allow the user to select from one of five options: Add, Get, Remove, Print and Exit. Instructions must be provided explaining to the user how to proceed. If the user selects Add, the script should prompt for a date and a line of text. Once entered, the item should then be appended to the end of the task list. Once completed, the script should return to menu mode. If the user selects Get, the script should prompt the user for a number. Once entered, the item should display the item with that number from the task list. So, if the user enters 4, the script should display the 4th item in the list (date and description). The item’s date should be displayed with a format that differs from the item’s description. If the user selects Remove, the script should prompt the user for a number. Once entered, the item should remove that number from the task list. So, if the user enters 4, the script should remove the 4th item from the list. The only output needed is a confirmation that the item was successfully deleted. If a user enters 0, the script should return to the menu without deleting. If the user selects Print, the script should show all of the items in the task list. Again, the date for each task should be displayed using a different format than the description. Each item should be preceded by its item number. The first item should be displayed following the number 1, the second items should be displayed following the number 2, etc. If the user selects Exit, the script should terminate. When it terminates, the script should display the name of the task list and the number of items that it currently holds. The message should be something similar to “Project1.todo saved with 7 items”. Submission Procedure Submit your assignment as one or more text files through Canvas. Do not submit a pdf or MS word file for a script. Remember, I will be testing your script on the environment provided in our classroom. So, it must work on that environment (probably Ubuntu). Grading The script will be graded based on the following criteria Implementation of Requirements 35 points Program Works Correctly 35 points Comments 10 points Notes Points can be deducted from your assignment based on the quality of its presentation. Handwritten assignments will not be accepted. Do not use MS Word to create your script. Scripts with smart quotes will not be changed and will thus fail when I attempt to execute them.
Answered Same DayNov 19, 2021

Answer To: Microsoft Word XXXXXXXXXXAssignment #4.doc Assignment #4 (80 Points) – COSC 4327 – Dr. Leonard Brown...

Ria answered on Nov 21 2021
132 Votes
filename="$1.todo" # read file name
if [ $filename == ".todo" ] # argument does not provide
file
then
    read -p "Enter the file name: " filename
    filename="$filename.todo"
fi
if test -f $filename # check whether file exist or not
then
    echo -e "File exists.\n" # exist
else
    echo "File does not exist. Creating New File..." # not exist
    > $filename # create new one
    echo -e "File $filename created.\n"
fi
echo "Splash Screen"
read # wait till enter
clear
echo "TODO Application"
while true # continue till exit
do
echo -e "\nEnter Your Choice:" # menu mode
echo "1. Add"
echo "2. Get"
echo "3. Remove"
echo "4. Print"
echo "5. Exit"
read choice # choose one...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here