SABBATINI Luca

Unregistered less info
41 reputation
2
bio website disneyland.disney.go.com
location
age
visits member for 2 years, 5 months
seen Mar 22 '12 at 20:50

Aug
10
awarded  Popular Question
Mar
9
comment Run an interactive bash subshell with initial commands without returning to the (“super”) shell immediately
@glennjackman sorry, I'm not familiar with the jargon. What is an "Expect solution"? Also, the exec bash solution involves two separate subshells. I want one continuous subshell.
Mar
9
comment Run an interactive bash subshell with initial commands without returning to the (“super”) shell immediately
@EduardoIvanec thanks for the mktemp command, I had forgotten about it. Sorry to press you further (you've been very helpful), but how exactly do you suggest exec should be used? Do you mean as I had written it in my original post? Also, could you tell me why you think it would be the most elegant solution?
Mar
9
comment Run an interactive bash subshell with initial commands without returning to the (“super”) shell immediately
@Lain, yes it would be slightly more complicated to run the original init ("rc") files alongside the few extra commands that I want to run at the beginning. This is why I consider Eduardo's solution, as solid as it is, to be just less than ideal. But like I said earlier, the question is posed as a hypothetical one. I think there ought to be a trivially straightforward way to do this with 3-5 extra characters, but already I count at least ~4 lines worth of work: making a temp file, echoing your commands into that file, running bash, removing that file, etc... Nevermind why I want to do it.
Mar
9
comment Run an interactive bash subshell with initial commands without returning to the (“super”) shell immediately
Eduardo, thank you. That's a nice solution, but... are you saying that this can't be done without having to fiddle with file I/O. There's obvious reasons why I would prefer to keep this as a self contained command, because the moment files come into the mix I'll have to start worrying about how to make random temp-files and then, as you mentioned, deleting them. It just requires so much more effort this way if I want to be rigorous. Hence the desire for a more minimalistic, elegant solution.
Mar
9
awarded  Student
Mar
9
asked Run an interactive bash subshell with initial commands without returning to the (“super”) shell immediately