added my current .efingerd script
This commit is contained in:
parent
215c5f73e2
commit
a54b2be739
|
@ -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
|
Loading…
Reference in New Issue