0

I have a script with one of its command let say "cmd" this cmd will move the user from the shell to some other server/shell , now when I run this script after executing "cmd" the shell gets changed (normal behaviour) but the commands following the "cmd" will not run and when I logout from the new terminal to come back to original one then only that commands execute on their own .

Is there any way so that the remaining will execute on the new terminal ?

  • I do not understand your question. Maybe you could sketch some of the code you already have, so that we have something concrete to discuss? – user1934428 Aug 30 '16 at 10:15
  • 1. some commands ....... 4. qrsh -P ilight # command to open a new session on some server 5 .setenv display #### now I want to set this display on the session newly opened from qrsh command ... hope now its clear .. – Sarabjeet Singh Aug 30 '16 at 11:03

1 Answers1

-1

I'm assuming your "cmd" is ssh opening a session on another server. If thats the case you can instruct ssh to run a command once the session is open: ssh user@server.com your_command_here

Emil R
  • 26
  • 3