Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SHIFTING BETWEEN SHELLS 1

Status
Not open for further replies.

harshcseiitb

Programmer
Sep 30, 2002
7
IN
I use a sh shell with $ prompt can i create 2 shells from 1
and run 2 programs simultaneously from both shells.

if yes plz give me a detailed description or just mail me the source of information

thanx in advance
harsh
 
harshcseiitb : can i create 2 shells from 1 and run 2 programs simultaneously from both shells.

yes, u can. at the command prompt use sh command to enter into a new shell, then execute the program u inted to run either with a bg option or just say $program-name & ( ampersand will run the program in background), then exit from this shell by executing the exit command, now u will be in your original shell, this time again run the desired program with &
now u can either exit fromt the shell or do some other work. there u r with two programs running simultaneously in two different shells created from one shell.

hope this was useful for u.
 
A shell in Linux is an application, just like any other. Running bash and korn at the same time is the same thing as running Apache and Samba. They all show up as a process in "ps".

Here's an example. If your in a bash shell and you execute a shell script that has a #!/bin/ksh at the top, it will call the korn shell to execute that script. The korn shell will run in the background as a process for the duration of the script.

ChrisP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top