Cover V01, I01
Article
Listing 1
Listing 10
Listing 11
Listing 12
Listing 13
Listing 14
Listing 15
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9

may92.tar


Listing 6

1: #
2: # killonite.sh: Version 2.0  2/27/92  by Leor Zolman
3: # Kill a user's existing spooled overnight job
4: # usage:
5: #       killonite.sh
6: #
7:
8: debug=Y
9: OwnOnly=Y       # Y=user may only kill own jobs; N=may kill any jobs
10:
11: if [ $debug = Y ]; then
12:     JOBS=jobs
13: else
14:     JOBS=/usr/spool/onite/jobs
15: fi
16:
17: [ $OwnOnly = Y ] && me=`logname`
18:
19: flist=`tmpname on`
20: cd $JOBS
21:
22: echo
23: echo "The list of your spooled jobs will be listed by Priority/Jobname."
24: echo
25:
26: if [ $OwnOnly = Y ]; then
27:     l */* 2>/dev/null | grep $me | awk '{print $9}' >$flist
28: else
29:     l */* 2>/dev/null | awk '{print $9}' >$flist
30: fi
31:
32: jobtokill=`lpick.sh "Spooled Jobs of Yours" $flist`
33: rm $flist
34:
35: if [ $jobtokill = ABORT ]; then
36:     echo "\nTaking no action.\n"
37:     exit
38: fi
39:
40: rm $jobtokill
41: echo "Overnight job \"$jobtokill\" has been deleted from the queue."
42: