Checks a 'sigs' file for any lines that are too long for hey.
Place this code in your ~/bin directory,
or run ~inky/bin/checksigs on Spoon.
#!/bin/bash
#Check if any lines in your sigs file are too long (>72 characters)
#-Inky, 2006
[ -z "$1" ] && echo "Usage: `basename $0` filename" && exit
[ ! -f "$1" ] && echo "File not found." && exit
invalid=`awk '{if(length>72)print NR " ",$0}' $1`
if [[ ! $invalid = "" ]]; then
echo -e "The following lines are too long for your sigs file:\n"
cat <<EOF
$invalid
EOF
echo -e "\nLines must be no longer than 72 characters."
else
echo "This file is okay!"
fi