LJ Archive

Listing 1. Sample—Moe's Job

#!/bin/sh
## directives to the at utility
# atrun uid=101 gid=100
# mail      moe 0
## Set  umask and env variables
umask 22
PATH=/sbin:/usr/local/jdk1.2.2/bin:/usr/local/bin: /bin:/usr/bin:/usr/X11R6/bin; export PATH
HOSTNAME=yuk.stooges.com; export HOSTNAME
USER=moe; export USER
LANG=en_US; export LANG
LOGNAME=moe; export LOGNAME
MAIL=/var/spool/mail/moe; export MAIL
HOME=/home/moe; export HOME
## Change to the current directory
cd /home/moe/jobs || {
         echo 'Execution directory inaccessible' >&2
         exit 1
}
## what "moe" typed/submitted
who
uptime
LJ Archive