|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
electronic submit script
I need to create a shell script to be used for electronic submission of assignments. when the assignment is handed out to students the lecturer will start the script,and it will terminate on the due date and time after disallowing students access to the directory. The script should accept the directory name,date and time to terminate(in this order) as command line arguments.The script should have the following functionality:
(i)Creates a sub-directory under my home directory (ii)Grants all users write access rights to the directory (iii)Runs continusly in the background waiting for permissions to be automatically changed by the script(allowing only lecturer to have access rights) at a certain time date,terminating immediately after that. |
|
#2
|
|||
|
|||
|
How much of the script have you already written? Which areas are you having problems with? If you at least give us something to work with then we're more apt to help you out because it shows that at least you're trying.
|
|
#3
|
|||
|
|||
|
Quote:
#so here it goes Shizuka TIMESTAMP=`DATE + '%Y%m%d%H%M%S'` umask 074 if [ $# -lt 2 ] then echo "Usage: $0 <directory><homework#>" echo "example: $0 dir1 1" echo "Where dir1 is the directory where homework resides,homework is an integer" exit 1 fi SUBDIR="/home/Homework_submitted/hw$2" if [ ! -d $1 ] then echo "The directory $SUBDIR doesnt exist!" exit 1 else if [ ! -d "$SUBDIR/$USER" ] then echo "Looks like a new submission!" mkdir "$SUBDIR/$USER chmod 777 "$SUBDIR/$USER" . . . . . |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > electronic submit script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|