Computing.Net > Forums > Unix > Shell Script menu driven program

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Shell Script menu driven program

Reply to Message Icon

Name: pochohantas
Date: December 15, 2008 at 05:52:53 Pacific
OS: Windows Vista
CPU/Ram: Intel Pentium/4GB
Product: Sony VAIO
Comment:

I need some help with writing a shell script menu driven application. Am I correct that I have to write the codes first and save and then write the executable file?

The menu has to have 4 choices. One choice allows the user to backup all of the files in their home directory into a special backup directory. If the backup directory does not exist, my script should create it. If the backup directory is not empty, a message should be displayed to the user that it is not empty and ask the user if they want to delete all files. If they say yes, delete the files and perform the backup. If they say no, display a message that the backup was not performed.

Can someone please tell me how to begin with this project. I am using the sh shell. Am I going to first write the codes in vi editor and save? Any help is appreciated.



Sponsored Link
Ads by Google

Response Number 1
Name: pochohantas
Date: December 15, 2008 at 10:06:48 Pacific
Reply:

I am writing the source codes. Is the user answer going to use the output redirection operator >>? for example:

std::cout << "Input Y for yes and N for no." << std:endl;
is the next line going to be
std::cout >> "read answer" >> std::endl;

I really need help.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Shell Script menu driven program

Call shell script from C++ program www.computing.net/answers/unix/call-shell-script-from-c-program/2276.html

shell script help! www.computing.net/answers/unix/shell-script-help-/4809.html

Using hex-code in shell script www.computing.net/answers/unix/using-hexcode-in-shell-script/4227.html