adds countships and minor manpage update
This commit is contained in:
parent
e1d8ad9ef0
commit
100542f3bc
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
all_users=$(grep -E '1[0-9]{3}' "/etc/passwd" | grep 'home' | awk -F":" '{print $1}')
|
||||
|
||||
finish () {
|
||||
if [ -f "$temp_shiplist" ]; then
|
||||
rm "$temp_shiplist"
|
||||
fi
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
# use temp file for accumulator
|
||||
temp_shiplist=$(mktemp -t "$(basename "$0").shiplist.XXXXXXX") || exit 1
|
||||
|
||||
# find all ship folders
|
||||
find "/var/gopher/" -maxdepth 1 ! -path "/var/gopher/" ! -path "/var/gopher/ships" ! -path "/var/gopher/log" -type d | while read -r shipdir
|
||||
do
|
||||
owner=$(stat -c %U "$shipdir")
|
||||
printf "%s\\n" "$owner" >> "$temp_shiplist"
|
||||
done
|
||||
|
||||
sort "$temp_shiplist" | uniq -c | sort -k1,1nr -k2,2n | awk '{print $1, $2}'
|
||||
|
||||
for u in $all_users; do
|
||||
if ! grep -q "$u" "$temp_shiplist"; then
|
||||
printf "0 %s\\n" "$u"
|
||||
fi
|
||||
done
|
|
@ -50,6 +50,16 @@ Finally, users may find up-to-date comprehensive guides on the
|
|||
system wiki by running the
|
||||
.B wiki
|
||||
command.
|
||||
.SH NOTES
|
||||
This is a full Ubuntu environment and allows users to do far more
|
||||
than simply write stories. Feel free to take advantage of the
|
||||
tools available here to experiment with other aspects of the
|
||||
command line. We have many programming languages / compilers
|
||||
installed.
|
||||
.PP
|
||||
Users are also allowed to run reoccuring or scheduled tasks using
|
||||
cron-jobs. If you do this, please include `/usr/bin/nice -n 19'
|
||||
before any tasks you run to minimize the system load over time.
|
||||
.SH BUGS
|
||||
There are probably many bugs in this system. Please report
|
||||
anything you find by mailing
|
||||
|
|
Loading…
Reference in New Issue