![](https://seccdn.libravatar.org/avatar/362bf3f8deb8b80599333609a2e814ac.jpg?s=120&d=mm&r=g)
Thanks; a definite improvement on the original :). I don't know how to use a .signature file with Mozilla, the mailer I most commonly use, so I haven't actually been running this myself much. I'm stunned that somebody actually bothered using it with their mailer. Another reward of open-source: having ones code reused by folks and learning about it later. :) --Steve Augart Robert C. Paulsen Jr. wrote:
In the spirit of open source, here is an update to your script. I ran into a problem after killing your script (with Ctrl-C) -- the fifo was left open but no one was writing to it so it caused my mail program (mutt) to hang. The update ensues that the fifo is removed when the script ends. See the section with the comment "# Be sure pipe is deleted upon exit."
=============== cut ==================================== ## Dynamic .signature ## written by Steve Augart <steve at users dot sourceforge dot net> ## 3/4/2002: exit handler by Robert Paulsen ##
## Set up the FIFO if it doesn't exist, and perform some sanity checks. fifo=~/.signature if [ -e $fifo ] && [ ! -p $fifo ]; then >&2 echo "$fifo already exists, and isn't a named pipe. Giving up." exit 1; elif [ ! -e $fifo ]; then mkfifo $fifo || {
&2 echo "Couldn't create a named pipe named $fifo"; exit 1; } elif [ ! -w $fifo ]; then >&2 echo "Cannot write to $fifo; giving up!" exit 1; fi
# Be sure pipe is deleted upon exit. function exit_handler() { [ -p $fifo ] && rm $fifo } trap "exit_handler" 0 # 0 is exit signal
set -e # exit in case of error. while :; do { echo "This is a sample dynamic .signature"; uptime; } > $fifo sleep 1 done =============== cut ====================================
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com