Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 0566a0d4c5fb6ca0a130708de119f877 > files > 18

gxmessage-2.12.4-2.fc15.i686.rpm

#! /bin/bash
# .gnome2/nautilus-scripts/word-count

# I, the Copyright holder of this work, hereby release it into the Public
# Domain. This applies worldwide. In case this is not legally possible, I
# grant anyone the right to use this work for any purpose, without any
# conditions, unless such conditions are required by law.
#
# 2009 Timothy Richard Musson <trmusson@gmail.com>

PROG=$(basename $0)

if [ "$1" = '-h' ]; then
  echo "Usage: $PROG FILE..."
  exit 0
fi

XMESSAGE=$(which gxmessage) || XMESSAGE=xmessage

font=monospace
[ "$XMESSAGE" = xmessage ] && font=fixed

[ "$#" -ge 1 ] &&
  wc "$@" 2>&1 | $XMESSAGE ${font:+-fn "$font"}     \
                         -title "$PROG"             \
                         -nearmouse                 \
                         -buttons GTK_STOCK_CLOSE:0 \
                         -default GTK_STOCK_CLOSE   \
                         -file -