02-24-2011
disown is a shell builtin - not a standalone utility. It is only for job control and does not actually detach a process from its parent.
All user processes have a parent ID. Why do you think that the parent ID of script B should not be that of script A?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to return a value from child script to a parent script just as a function does.
The child script will look for a file and if exists will return 1 else 0.
I need to capture the status 1 from child script in the parent script and proceed further. if 0, i need not do... (1 Reply)
Discussion started by: borncrazy
1 Replies
2. Solaris
:confused: Can some one advise me how to know the parent script from a child script.
ex: i can call 1.sh or 2.sh from 3.sh so wot is the command to know from which script 3.sh is called from? (1 Reply)
Discussion started by: raki
1 Replies
3. Shell Programming and Scripting
Hi everybody,
I have a script in which I'm invoking another script which runs in a subshell.
after the script is executed I want to return to the parent shell as some variables are set. However i'm unable to return to my original shell as the script which i'm calling inside is invoked in... (5 Replies)
Discussion started by: gurukottur
5 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
Hello everyone,
I'm trying to write a script, i would like to say the child kills the parent,
how would i do that? (2 Replies)
Discussion started by: jessy21
2 Replies
6. Shell Programming and Scripting
Hi,
i have a script a.sh that calls b.sh
Both take parameters
a.sh
{
b.sh p1 p2 p3
}
b.sh
{
GIVEN_CMD="`basename $0` $@"
echo "${GIVEN_CMD}
}
Now when i run:
a.sh q1 q2
It prints only
a.sh q1 q2
Inside b.sh, how can i print both the script names and their parameters passed? (6 Replies)
Discussion started by: ysrini
6 Replies
7. Shell Programming and Scripting
PARENT SCRIPT
#!/bin/ksh
#
. $HOME/.profile
. /etl/estdm2/DEV/scripts/DM_ENV_VARS.ksh DEV DB
echo "CALLING CHILD SCRIPT"
. /${SCRIPT_DIR}/DM_CHild.ksh -x HRDATA.dat -e $sEnv -d Wait_Time
*****THE PARENT SCRIPT EXITS HERE ********
*****whether the file is found or not*******
... (2 Replies)
Discussion started by: sumeet
2 Replies
8. Shell Programming and Scripting
Hi everyone,
I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that
parent_script
for a in 1 2 3 4 5
do
exec test -n $a
done
What I want to do is when parent_script is killed,... (0 Replies)
Discussion started by: geovas
0 Replies
9. Shell Programming and Scripting
Hi, my question is similar to my earlier post from 2009 which is Closed now
https://www.unix.com/shell-programming-scripting/141945-get-current-parent-script-name.html
script child.sh can be called by any script say, parent1.sh, parent2.sh, parent3.sh,...
child.sh should be able to say what's... (1 Reply)
Discussion started by: ysrini
1 Replies
10. Shell Programming and Scripting
#!/usr/local/bin/bash
set -vx
/prod/HotelierLinks/palaceLink/bin/PalacefilesWait /prod/HotelierLinks/palaceLink/bin/prodEnvSetup 03212013 &
if
then
echo "fatal error: Palace/HardRock failed!!!!" 1>&2
echo "Palace Failed" | mail -s "Link Failed at Palace/HardRock" -c... (1 Reply)
Discussion started by: aroragaurav.84
1 Replies
LEARN ABOUT OPENSOLARIS
script
script(1) User Commands script(1)
NAME
script - make record of a terminal session
SYNOPSIS
script [-a] [filename]
DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the
record is saved in the file typescript. See WARNINGS.
The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends
when the forked shell exits or when Control-d is typed.
OPTIONS
The following option is supported:
-a Appends the session record to filename, rather than overwriting it.
NOTES
script places everything that appears on the screen in filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a
privileged user, that is, root. Be sure that typescript is not a link before running script.
SunOS 5.11 30 Jan 2004 script(1)