pgeresh.in 233 B

1234567891011121314151617
  1. #!/bin/sh
  2. TMPFL=
  3. if ! tty -s; then
  4. TMPFL=`mktemp /tmp/geresh.XXXXXX` || TMPFL=/tmp/geresh.$$
  5. cat > $TMPFL
  6. fi
  7. geresh $TMPFL "$@" </dev/tty >/dev/tty
  8. if ! tty -s <&1; then
  9. cat $TMPFL
  10. fi
  11. [ -n "$TMPFL" ] && rm -f $TMPFL