Fill This Form To Receive Instant Help
Homework answers / question archive / Write the bash script coding
Write the bash script coding.sh that does the following:
? Displays the welcome messages o Welcome back YourUsername!
o It's time to code again TheDateAndTime
? Changes current working directory to home/YourUsername
? Creates the following structure of folder if not created or creates what is missing of it. (Any work done is reported/written/appended to the file coding.log in the folder private)
o Main folder: mycode
? Sub folders: c, java, python, others, public, private, and temp.
? [Bonus] Starting from the folder home/YourUsername/mycode, it search for files with the extension c, cc, cpp, c++ and move them to c subfolder. (Any work done is reported/written/appended to the file coding.log in the folder private)
o It repeats the step above for java and python files. Avoid duplicating code and use a repeating structure.
? Sets/resets the following permissions for this structure of folders and any possible subfolders. (Any work done is reported/written/appended to the file coding.log in the folder private)
o rwxr-x---- for the folders c, java, and python and all of their contents
o rwx—x--- for the folder others and all of its contents
o rwxrwxr-x for public and all of its contents
o rwx------ for private and all of its contents
? Deletes the contents of the folder temp including any possible subfolders. (Any work done is reported/written/appended to the file coding.log in the folder private)
? Changes directory to the root of this folder's structure.
? Displays the tree of this folders' structure.
? Asks you to enter the name of the folder to access within this structure. (check that the folder exits and handle error)
? Lists the contents of this folder
? If the folder is the c folder:
o If the file p.c exists in this current folder it renames it to p_currentDate.c
o Opens the a p.c at the path of the folder you chosen earlier with JEdit o Preforms these final tasks:
o Preforms these final tasks:
? Changes the prompt of the terminal to YourUsername_OS>
? Changes the working directory to the one you have chosen earlier
? Displays the path of the current working directory
? Displays the messages
? To compile a C program use gcc filename.c -o filename
? To execute it use ./filename
? Enjoy Coding!