On 19-Jan-08, Hans-Peter Jansen wrote:
Hi,
I'm trying to automate some processes, where an initial command should run inside a xterm, and the xterm kept interactive thereafter (xterm -e ...).
Since the culprit seem bash, I've tried most ways of invoking bash with -i, -s and -c options, but as soon as I give bash the -c option, it
The only possibility I see is to start an interactive shell and let it read your initial command from a special rcfile: xterm -e bash --rcfile my_command -- my_command: -------------------------------------------------- #!/bin/bash # this mini-script is sourced instead of $HOME/.bashrc, so we source # $HOME/.bashrc anyway, before or after "your command" . $HOME/.bashrc your command ----------------------------------------------------------------- (Also, usually, in this case you do not need the -i option to bash.) Otherwise, if you used the -c option to read commands from a string, you can not change (redirect) the command source anymore, as it is not through an open file but just the command line argument that is interpreted by the shell. The shell will inevitably terminate after all commands have been processed. Regards, -- Olaf Dabrunz (Olaf <at> dabrunz.com) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming-de+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming-de+help@opensuse.org