Creating new sessions using Shell Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iamforsecurity
    New Member
    • Mar 2008
    • 1

    Creating new sessions using Shell Script

    Hi,

    I am a newbie in Shell Script. I am trying to open 10 new sessions,each session running on a separate thread. For each session, I open a new xterm, go to a particular directory and run a script. here is the code for the same.

    #!/bin/sh
    xterm
    cd /home/rt
    ./try.sh
    xterm
    cd /home/rt
    ./try.sh

    once the script runs only a single window opens and the script try.sh does not start on the newly created window.

    If someone can point out where I am going wrong it will be of great help
    thanks
    AB
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    If you haven't added . to your $PATH, that won't run unless (this may be the case even if you have added it) you use 'sh ./try.sh'.

    Comment

    Working...