identify the child shell


 
Thread Tools Search this Thread
Operating Systems Solaris identify the child shell
# 1  
Old 10-29-2007
identify the child shell

how can we identify which child shell being created by the sh command.
Is it necessary that the child shell created will be the same as parent shell or it may be different.
How can we change this setting?

please help
Thanks in advance
# 2  
Old 10-29-2007
If you run "sh" you will get a process running "sh".

If you are running a script the shell will either be:

(a) if the first line says "#!XXXX" then XXXX will be taken as the shell

else

(b) the same type as the currently executing shell
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Urgent. Script to identify child jobs in autosys recursively

I have been working on to neatly present the job dependency lineage in autosys through ksh/perl and I am having trouble in recursively finding the dependency. it will be great if anyone could share their thoughts on this. (2 Replies)
Discussion started by: Vhunt
2 Replies

2. Shell Programming and Scripting

How to identify heredocs in shell scripts?

tr a-z A-Z << END_TEXT one two three four five six END_TEXT i dont want this to be executed when someone runs the script that this is in. but for some reason, it gets executed. anywhere i can wrap this up in something to make sure it never gets executed? another example: cat <<... (1 Reply)
Discussion started by: SkySmart
1 Replies

3. Shell Programming and Scripting

Identify variables used in the shell script

Hi, Is there any simple way to get/identify the variables that are used in a file and print those variable names. If I have something like this in a file, /$var/temp_dir/${var2}${var3}.log I want to display the variables 'var', 'var2' and 'var3' from that file. I tried something like... (6 Replies)
Discussion started by: pvamsikr
6 Replies

4. Shell Programming and Scripting

child shell..

How to create a child shell ? (1 Reply)
Discussion started by: anupdas
1 Replies

5. Shell Programming and Scripting

test script to identify SHELL

I am new to BASH and writing a small script to identify the SHELL . #!/bin/bash BASH='/bin/bash' KSH='/bin/ksh' if then echo "it's Bash" else echo "it's not Bash" fi $ bash -x a.sh + BASH=/bin/bash + KSH=/bin/ksh + '' a.sh: line 4: where am I missing . PLease advice . (10 Replies)
Discussion started by: talashil
10 Replies

6. UNIX for Dummies Questions & Answers

Exit from n th child shell

Hi, I am using ksh to write my shell script. I need to create multiple-level of nested sub shells in my script. Lets say I have at n th subshell. My question is how do I come out from there to main login shell. If I use 'exit' command then it is exiting from just one subshell and back to... (4 Replies)
Discussion started by: indra_saha
4 Replies

7. 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

8. UNIX for Advanced & Expert Users

executing commands in child shell

I have to execute some commands after executing one command ( cleartool setview Tagname) Problem is that I write commands in script like this. echo "test1" cleartool setview tagname echo "test2" copy file1 file2 echo "test3" but when I execute script. Output --------- test1 If I... (1 Reply)
Discussion started by: udaykishore
1 Replies

9. Shell Programming and Scripting

how to identify the type of shell using comands..

Dear friends, please tell me how to identify the type of the shell (whether cShell, kshell or anything else) please tell me the command. waiting for ur reply.... regards, swamymns (2 Replies)
Discussion started by: swamymns
2 Replies

10. Shell Programming and Scripting

killing a child process within a shell

Hi All, I have a written a script in korn shell for importing data into a oracle database. The shell invokes the import within the script. I want to kill this import (child process) . I tries using trap, but this does not kill the import even if i press cnt c. i have to login into other terminal... (2 Replies)
Discussion started by: yerics
2 Replies
Login or Register to Ask a Question