Sponsored Content
Full Discussion: executing in parent shell.
Top Forums UNIX for Dummies Questions & Answers executing in parent shell. Post 5005 by Alan Bird on Monday 6th of August 2001 04:25:06 PM
Old 08-06-2001
Question executing in parent shell.

I have a script that I want to run in my current shell. I know that if I start it with a period ie '. myprogram' that this will cause it to run in my current shell instead of starting a new shell for it. What if I forgot to put the period. Is there some command that I can put in 'myprogram' that would envoke 'myprogram' back in my parent shell?

Since 'myprogram' would already be running in a new shell I want to kick off a new version back in my parent shell and then exit this one. Does any one have any ideas?

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parent shell pid

hi folks can any suggest me how to get a parent processid in the script if i am executing this in the script vi myscript.sh echo "parent shell pid"$$ sh myscript.sh but when i am executing this i am getting a new pid(actually that is the child pid) whenever i am executing this... (4 Replies)
Discussion started by: maheshwin
4 Replies

2. Shell Programming and Scripting

How to change parent shell's variables?

I have a question about how to change variables in parent shell. My script, test.sh, is below: #!/bin/sh # test.sh PATH=. The commands I ran for test: $ echo $PATH .:/usr/bin:/usr/sbin:/usr/local/sbin: $ sh test.sh $ echo $PATH .:/usr/bin:/usr/sbin:/usr/local/sbin: ... (1 Reply)
Discussion started by: pankai
1 Replies

3. Shell Programming and Scripting

parent shell is waiting upon the child shell

Hi, I haev to devlop a script which when executed will take in a sudo privelege and run a set of commands then will go back to parent shell and execute the rest of the command But the problem I am facing is that when the script is executed it takes the sudo privelege but it waits for the... (0 Replies)
Discussion started by: ruchirmayank
0 Replies

4. Programming

parent not waiting until child complete executing another program through execl()

Hi, I am calling a program that greps and returns 72536 bytes of data on STDOUT, say about 7000 lines of data on STDOUT. I use pipe from the program am calling the above program. Naturally, I execute the above program (through execl() ) throught the child process and try to read the... (4 Replies)
Discussion started by: vvaidyan
4 Replies

5. Shell Programming and Scripting

full path of a file situated either in parent's dir. or parent's parent dir. so on...

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
Discussion started by: yahoo!
1 Replies

6. UNIX for Advanced & Expert Users

input to Parent shell

how can we give input to parent shell? i mean shell that is creating a child and our c prograame will run on that child..and then it return to parent shell.. what i want to do i want execute a c programe that will give command as input to parent shell & get output from parent shell and... (1 Reply)
Discussion started by: gajju
1 Replies

7. UNIX for Advanced & Expert Users

executing a command on parent shell

Hi, I am logging in from my PC terminal to a linux host using ssh. Is it possible to execute a command on the parent PC terminal from the linux host during login. NOte that the parent PC does not have sshd running. Sam (1 Reply)
Discussion started by: sardare
1 Replies

8. Shell Programming and Scripting

How to make parent shell finish last?

Hi all, I have a shell that kicks off several sub-shells and make them run parallelly, like: shell1.sh & shell2.sh & shell2.sh & ... However, since all sub-shells run parallely, the parent shell finished right after it's submitted, like: $ parent.sh & $ + Done parant.sh & $ ... (2 Replies)
Discussion started by: visio2000
2 Replies

9. Shell Programming and Scripting

Executing multiple kshs from parent ksh

Hi, I have to migrate files from one server to another .For this I am using a mapping file and ksh .The mapping file contains the source and destination directories of the files to be migrated.Each line in the mapping file corresponds to one file that is to be migrated.The ksh upon execution... (3 Replies)
Discussion started by: Kishore_1
3 Replies

10. Shell Programming and Scripting

Kill a process from parent shell within a shell script

Hi, I am looking for a solution for the following problem: Im Using tcpdump within a shellskript started in a subshell by using brackets: ( /usr/sbin/tcpdump -i ... -c 1 ) - I want the outout of tcpdump saved in a variable - Than tcpdump-Process in the Subshell should be killed - and I... (6 Replies)
Discussion started by: 2retti
6 Replies
shell(1F)							   FMLI Commands							 shell(1F)

NAME
shell - run a command using shell SYNOPSIS
shell command [command] ... DESCRIPTION
The shell function concatenate its arguments, separating each by a space, and passes this string to the shell ($SHELL if set, otherwise /usr/bin/sh). EXAMPLES
Example 1: A sample output of shell command. Since the Form and Menu Language does not directly support background processing, the shell function can be used instead. `shell "build prog > /dev/null &"` If you want the user to continue to be able to interact with the application while the background job is running, the output of an exe- cutable run by shell in the background must be redirected: to a file if you want to save the output, or to /dev/null if you don't want to save it (or if there is no output), otherwise your application may appear to be hung until the background job finishes processing. shell can also be used to execute a command that has the same name as an FMLI built-in function. NOTES
The arguments to shell will be concatenate using spaces, which may or may not do what is expected. The variables set in local environments will not be expanded by the shell because "local" means "local to the current process." ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), attributes(5) SunOS 5.10 5 Jul 1990 shell(1F)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy