Question: I created the following code with that instructions A. How Make a shellScript named ExShell.sh to create a menu with the following options : Search

I created the following code with that instructions

A. How Make a shellScript named ExShell.sh to create a menu with the following options :

Search for a file and delete it Create a directory called "repository", Make an FTP from the server to your machine (client) Make a reboot of your computer Send the file to my email account Exit

B. Clarifications of the menu:

In this directory you must copy ALL the files of this exam, including the "ExamShell.sh" script

C: FTP must be in line of commands.

CODE

#!/bin/bash clear date while true do

clear date echo echo "-----------------------------------------------------------"

echo "1. Enter file name"

echo "-----------------------------------------------------------"

echo "2. Create a directory called "repository""

echo "-----------------------------------------------------------"

echo "3. Make an FTP from the server to your machine"

echo "-----------------------------------------------------------"

echo "4. Make a reboot of your computer"

echo "-----------------------------------------------------------"

echo" 5. Send the file to my email account"

echo "-----------------------------------------------------------"

echo" 6. Exit"

echo "-----------------------------------------------------------"

// CODE OF PROGRAM TO OPERATING SYSTEMS EX#2

read -p "Insert your option" opc

case $opc in

1) read -p "enter file name:" filename

echo -e " "

echo -e " "

read -p "enter directory to search:" dr

echo -e " "

find $dr -name $fl

;;

2) mkdir ./repository

echo -e "respository directory created "

;;

3) read -p "enter ip address or hostname to connect:" ip

ftp $ip ;;

4) read -p "System Restarted" $shutdown -h now

;;

5)read -p "enter email id:" em; mail -s "firstname lastname"$em<<< 'this is body of the mail'

;;

6)exit;;

esac done

I need to repair it or at least know the errors that it has

Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!