added my current .efingerd script

This commit is contained in:
sndr 2020-06-19 17:06:15 -04:00
parent 215c5f73e2
commit a54b2be739
1 changed files with 35 additions and 0 deletions

35
.efingerd Normal file
View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# A simple script to print your stuff on systems with the efingerd
# finger daemon.
#
# Usage: Put in your $HOME, create a dir named .finger and add your
# .plan, .project and wathever else to it. Keep in mind that
# files without a preseding period (.) will be ignored. This is
# by incompetence rather than design.
#
# Author: sndr@tilde.team
# License: public domain
#
FINGERDIR=/home/$3/.finger
FILES=$FINGERDIR/.*
for file in $FILES
do
if [[ $(basename $file) == "." || $(basename $file) == ".." ]]; then
:
else # This whole colon and else business is bonkers,
# but I could not for the life of me get it to work
# any other way.
if [ -s $file ]; then
echo $(basename $file)
sed 's/^/ /' $file
echo ""
else
echo $(basename $file)
echo " (empty file)"
echo ""
fi
fi
done