xterm 623 B

123456789101112131415161718
  1. #!/bin/sh
  2. #rxvt does not understand the '-hold' option.
  3. if [ "`echo -n ${*} | grep '\-hold '`" != "" ];then
  4. EXECCOMMAND="`echo -n ${*} | grep -o ' \-e .*' | sed -e 's/ \-e //'`"
  5. if [ "$EXECCOMMAND" != "" ];then
  6. echo '#!/bin/sh' > /tmp/xterm_simulate_hold.sh
  7. echo "$EXECCOMMAND" >> /tmp/xterm_simulate_hold.sh
  8. echo 'echo' >> /tmp/xterm_simulate_hold.sh
  9. echo 'echo -n "FINISHED. PRESS ENTER KEY TO CLOSE THIS WINDOW: "' >> /tmp/xterm_simulate_hold.sh
  10. echo 'read simuldone' >> /tmp/xterm_simulate_hold.sh
  11. chmod +x /tmp/xterm_simulate_hold.sh
  12. exec rxvt -e /tmp/xterm_simulate_hold.sh
  13. fi
  14. fi
  15. exec rxvt "${@}"