I'm using pbs interactive jobs in bash, launched using qsub -I
, and I'd like to run some command after launch. After this command is run, I'd like to continue to use the interactive reservation as usual.
I'm unsure how to accomplish this, because as with opening interactive ssh prompts, commands issued after the remote terminal are completed, ie qsub -I; hello
.
EDIT: To clarify, in the above example (qsub -I; hello
), I want to run hello
inside the qsub reservation, not on the machine where I make the reservation.
I'm aware I can specify a job script for qsub, but from the man page I don't think it does what I want:
... the job is an interactive job. The script will be processed for directives, but will not be included with the job.
Try this: run qsub -I hit CTRL-Z to put the process to sleep run hello when hello is finished you can use fg to return to qsub
you can do the same with
If I understand your clarification you may be wanting to run this in a subshell i.e
A subshell may be used to set up a "dedicated environment" for a command group.
taken from: http://tldp.org/LDP/abs/html/subshells.html