[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CS Computer script
A few people were talking about not knowing the names of the CS machines
in the CS labs. Attached it a script I use to find machines and the
users on them. -Dan
#!/bin/sh
ICU="icu0 icu1 icu2 icu3 icu4 icu5 icu6 icu7 icu8 icu9 icu10 \
icu11 icu12 icu13 icu14 icu15 icu16 icu17 icu18 icu19 icu20"
LANGL="ada apl awk basic cobol cplusplus eiffel forth fortran \
java lisp logo modula pascal perl pl1 prolog scheme \
smalltalk snobol"
PIZZA="bacon cheese combo garlic ham hamburger meat mushroom olive \
onion pepperoni peppers pesto pineapple salami sausage spinach \
supreme tomato veggie"
SCIFI="consult anthony asimov bear bova bradbury brin burroughs \
clarke ellison heinlein herbert lackey leguin niven shelly \
stoker verne wells zamiatin zelazny"
GRADL="gradlinux1 gradlinux2 gradlinux3 gradlinux4 gradlinux5 \
gradlinux6 gradlinux7"
if [ $# = 0 ]; then
echo "Usage: golook.sh [icu|lang|pizza|scifi|gradlinux]"
exit 0
fi
if [ $1 = icu ]; then
LAB=$ICU
elif [ $1 = lang ]; then
LAB=$LANGL
elif [ $1 = pizza ]; then
LAB=$PIZZA
elif [ $1 = scifi ]; then
LAB=$SCIFI
elif [ $1 = gradlinux ]; then
LAB=$GRADL
else
echo "Usage: golook.sh [icu|lang|pizza|scifi|gradlinux]"
fi
for x in $LAB; do
rusers -a $x 2>/dev/null
if [ $? != 0 ]; then
echo \>\>\> $x appears to be down \<\<\<
fi
done