How to run .sh file in other script?

Hii friends,
Actually, I am a beginner in shell scripting. I am trying to run a master .sh file. The master .sh file will open 2 different terminals and then run .sh file on first terminal, an executable file in second terminal.
We, the beginners, can learn a lot if the "gurus" like you will help us.

Thanks in advance

---------- Post updated at 04:41 AM ---------- Previous update was at 04:24 AM ----------

Someone please help me..... I am not getting any solution for this problem.
Please help me

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

Be patient, somebody will probably answer your question.

Thank You.

The UNIX and Linux Forums.

If you would show us what you've tried, explain in detail what you want the two "terminals" to do, and explain what is happening with your current script; we would have a much better chance of helping you. The statement you have made so far is so vague that we don't really have any idea how to help you.

Hi all,
Actually, I am working on netFPGA platform. In that, I want to run a script file which will first perform some commands and then open two separate terminals. In the first terminal, I want to run another script and in the second terminal, I want to run an executable file ./scone.

#!bin /bash
/usr/local/sbin/cpci_reprogram.pl --all

/* open a new terminal. In that terminal, change directory and then run ./scone */
gnome-terminal --tab -e cd /usr/local/netfpga/projects/scone/sw
./scone

/* open another terminal. In that terminal, change directory and then run router.sh */
gnome-terminal --tab -e cd /usr/local/netfpga/lib/java/gui/
./router.sh

You can use nohup command to put one of your script to background while other will continue to run in the foreground.

 
nohup ./scone &

1 Like

Thanks milan for your valuable help. Still its not working

Error:

nohup: appending output to `nohup.out'
nohup: failed to run command `./scone': No such file or directory

.scone file has to be run from root with all permissions.
How can I do "su root" in script, so that my .scone file may run.

I suspect it means what it says -- there is no file named 'scone' in the current folder.

Usually you would use sudo to run su automatically.

sudo /absolute/path/to/programname

You can configure sudo with visudo to permit yourself or permit very specific things to run passwordlessly.