Alan Erceg
Stunt Coordinator
- Joined
- Jul 16, 1999
- Messages
- 154
ok here's the deal.....im gettin really frustrated. I have a script to write for a UNIX class......and it is getting the best of me....
here is the basic outline of what it involves...
you are designing a menu driven program for a company(text).. which when the user logs on will tell where the user logged on from...who the user is...and what files are in that users current directory. Now so far i have all of that working fine and dandy. No problems there.
Here is where my problems start...
The menu gives the user a list of options to do...
The User can either:
Delete a file
backup file(s) to a predetermined directory
print file(s) to any printer
move or rename files to any directory where they have permissions
create directories in any directory they are allowed
send files to any user on the system
change file permissions
edit files withtin the VI editor
an option to drop to the shell level
an option to exit out of UNIX completley
I just dont know where to start.....i was thinking makin all of those mini scripts and calling them from my main script would be easier.
so for ex. the user hits 1 to delete a file it would call up a del_script that would look something like this...
#! /bin/sh
#alan erceg
#
echo "Please Enter the file you wish to delete c "
read file
then check to make sure that file exsists but im not sure of the syntax for that
give them confirmation like
echo "File $file has been deleted..Thank You! "
then have it exit back to the main script.....
something like that. Like i said i just dont know where to begin. I have to present this in front of my class tomorrow morning...and its just stressing the hell outta me. this doesnt come to me like C++ or VB or JAVA or anything like that does.
So any help at all would be greatly appreciated..
Thank You
Alan
here is the basic outline of what it involves...
you are designing a menu driven program for a company(text).. which when the user logs on will tell where the user logged on from...who the user is...and what files are in that users current directory. Now so far i have all of that working fine and dandy. No problems there.
Here is where my problems start...
The menu gives the user a list of options to do...
The User can either:
Delete a file
backup file(s) to a predetermined directory
print file(s) to any printer
move or rename files to any directory where they have permissions
create directories in any directory they are allowed
send files to any user on the system
change file permissions
edit files withtin the VI editor
an option to drop to the shell level
an option to exit out of UNIX completley
I just dont know where to start.....i was thinking makin all of those mini scripts and calling them from my main script would be easier.
so for ex. the user hits 1 to delete a file it would call up a del_script that would look something like this...
#! /bin/sh
#alan erceg
#
echo "Please Enter the file you wish to delete c "
read file
then check to make sure that file exsists but im not sure of the syntax for that
give them confirmation like
echo "File $file has been deleted..Thank You! "
then have it exit back to the main script.....
something like that. Like i said i just dont know where to begin. I have to present this in front of my class tomorrow morning...and its just stressing the hell outta me. this doesnt come to me like C++ or VB or JAVA or anything like that does.
So any help at all would be greatly appreciated..
Thank You
Alan