I'm trying to write a simple shell script for launching commands with urxvt. The idea is this (not the complete script, just the idea):
PRMPT="read -r CMD" urxvt -g 55x6-20+20 -e $PRMPT CMD
There are two problems with this script. The first one is that
read is not fit for this kind of task, as it would ignore options of a command (if I write
echo hello read would assign
CMD and ignore
hello). The second one, which is the one that puzzles me most, is that
urxvt -e exits immediately and does not wait for my input. I figure that it has to do with the fact that
read is a builtin function, but for example
urxvt -e echo hello works fine.
Does anybody have any suggestions on how to change the script?