#!/bin/bash -eu # xterm-cmd: run a command in an xterm, then return to the shell escaped_cmd=`printf "%q " "$@"` exec xterm -e "$escaped_cmd; ${shell:-bash} -i"