Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > d2a1d255b6285309fae32950a0c56e31 > files > 18

gxmessage-2.12.4-1.fc13.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 -