Results 1 to 2 of 2
I am having so much troubled with this project. It's the last one and I just want to get this class over with. The teacher doesn't teach for sh*t and ...
- 05-10-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 1
Need Help With A Project
I am having so much troubled with this project. It's the last one and I just want to get this class over with. The teacher doesn't teach for sh*t and I haven't learned very much. My book is also not very helpful. I know it's asking a lot, but if someone is bored or wants to take a stab at it let me know. I haven't the faintest idea where to start. I have some of the menu options written, and I know I should use case statements more than likely, but besides that I'm lost and I'm going to fail.
Write a BASH script that displays the following menu and prompts a user for one character input to invoke the menu option as follows:
a. List all the files in the present working directory.
b. Display today’s date and time
c. invoke the domain2ip shell script.
d. Display whether a file is a simple file or a directory
e. Create a backup for a file
f. Compress a file
g. Start a telnet session
h. Start an ftp session
x. Exit.
* The domain2ip shell script should ask the user for a list of domain names.
* The shell script should allow a user to try any of the options any number of times, and the script should only quit after a user gives x as an input option.
* Input should take into account capital and lower case letters.
* Options d, e and f should insert a prompt for the user to enter a file name before invoking the utility.
Here is the domain2ip script that I wrote:
clear
NUMARG=$#
COUNT=1
while [ $COUNT -le $NUMARG ]; do
nslookup "${!COUNT}"
(( COUNT=COUNT+1 ))
done
- 05-10-2009 #2
I would recommend checking out this site:
Advanced Bash-Scripting Guide
or this one
Bash Shell Programming in Linux
As for doing your homework...you know the rules...Gerard4143Make mine Arch Linux


