Question: UBUNTU Shell Script I already made the first 4 posted below I would need help for the next steps Make a shell script in UBUNTU
UBUNTU Shell Script
I already made the first 4 posted below I would need help for the next steps
Make a shell script in UBUNTU that permits:
1. Create a group named cpen452
2. Create a user which group be cpen 452
3. Search all the files with extension .txt and and delete them
4. Create a directory called quiz and create in that directory 10 files with the same name that the last characters be a consecutive number between 0 and 9; everything has to be realized with the same command.
5. Realize a copy of the home directory in a usb
6. List all the processes en the system y ("Kill") one of them according to relevance
7. Send a message to all the users of the system : "Save all your work and close session, the system will turn off in 2 minutes"
8. Close
Exit
*Copy the script in the home directory (of each one of the integrants)
I want to create a "menu" in a script that allows all that
I already have the first 4 except the file deletion
Here they are:
sudo groupadd -g 10000 cpen452 sudo useradd -G cpen452 cpen452 find . -type f -name "*.txt" mkdir quiz cd quiz today="$( date +"%Y%m%d" )" number=0
while test -e "$today$suffix.txt"; do (( ++number )) suffix="$( printf -- '-%02d' "$number" )" done
fname="$today$suffix.txt"
printf 'Will use "%s" as filename ' "$fname" touch "$fname"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
