06-02-2008
tell me how to exit from parent-child relationship from child script
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
Is it possible to exit nicely(ie, to echo a message with the error occurred) from a shell script(quiet a big one :)) once it encounter an error in between the lines?
For example, in my script I am calling the command mkdir and sometimes (when the directory already exists) it... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies
2. Shell Programming and Scripting
Hi Folks.
My script is not exiting after run though its working correctly please suggest.
#!/bin/ksh
trap '' HUP
. /bin/functions
config_env
PATH=/bin:/usr/bin:/usr/local/bin:$EXEC_PATH:$ORACLE_HOME/bin
MONTH=$(control_register month)
YEAR=$(control_register year)
DATE_NOW="Job... (1 Reply)
Discussion started by: Haque123
1 Replies
3. Shell Programming and Scripting
I have a script abc.sh. Its contents are as follows: (7 Replies)
Discussion started by: lassimanji
7 Replies
4. Shell Programming and Scripting
Hi,
I am trying to exit the script from a function.
I was in assumption that if we use exit ( inside or outside the function) it will exit from the script.
alternatively, return will exit from that particular function.
but in my case, exit is exiting from the function and not the script.... (8 Replies)
Discussion started by: shellwell
8 Replies
5. Shell Programming and Scripting
I have a script planned for the Helpdesk to allow them to (on a couple of RHEL 3 / RHEL 5 servers) reset passwords, stop / start printers, and clear print queues. The appropriate sudo permissions were given to their accounts, and the individual functions all work just fine. The ability to move... (0 Replies)
Discussion started by: tearsong
0 Replies
6. Shell Programming and Scripting
I have to write a script in ksh which again should call another script. Say A.ksh is calling B.ksh. Now in B.ksh if the condition we are checking for is true then we have to go back to the main script A.ksh or if the condition in B.ksh is false then we have to totally come out of the scripts.
I... (1 Reply)
Discussion started by: vpv0002
1 Replies
7. Shell Programming and Scripting
This is what I've tried:
#!/bin/sh
send sh
send showifs
send exit
! killall minicom
My problem is that for some reason when I do this it doesn't give me the results of the prior commands sent like showifs
So I suspect my syntax is wrong. (1 Reply)
Discussion started by: uradunce
1 Replies
8. Shell Programming and Scripting
Below is the script that i'm using but i'm getting an error,
echo -n "Read the letter >(enter a or b or c) "
read letter
if || || ;
then
echo "unacceptable character"
else
echo "Character Accepted"
fi
if the character entered is not equal to a or b or c, the script should... (6 Replies)
Discussion started by: web2moha
6 Replies
9. Shell Programming and Scripting
Hi Team,
Need your help for the below code snippet. I wrote a module to read the file names remote server using file name convention.
Issue : My script is coming out from while loop without reading complete file.
test1()
{
while read line
do
echo $line
file_nm_convention=`echo... (3 Replies)
Discussion started by: gvkumar25
3 Replies
10. Shell Programming and Scripting
function2()
{
cmd1
cmd2
cmd3
....
cmdn
}
function2()
{
cmd11
cmd12
cmd13
....
....
}
for i in {1,2} (7 Replies)
Discussion started by: yanglei_fage
7 Replies
LEARN ABOUT SUNOS
wsreg_get_child_components
wsreg_add_child_component(3WSREG) Product Install Registry Library Functions wsreg_add_child_component(3WSREG)
NAME
wsreg_add_child_component, wsreg_remove_child_component, wsreg_get_child_components - add or remove a child component
SYNOPSIS
cc [flag ...] file ...-lwsreg [library ...]
#include <wsreg.h>
int wsreg_add_child_component(Wsreg_component *comp, const Wsreg_component *childComp);
int wsreg_remove_child_component(Wsreg_component *comp, const Wsreg_component *childComp);
Wsreg_component **wsreg_get_child_components(const Wsreg_component *comp);
DESCRIPTION
The wsreg_add_child_component() function adds the component specified by childComp to the list of child components contained in the compo-
nent specified by comp.
The wsreg_remove_child_component() function removes the component specified by childComp from the list of child components contained in the
component specified by comp.
The wsreg_get_child_components() function returns the list of child components contained in the component specified by comp.
RETURN VALUES
The wsreg_add_child_component() function returns a non-zero value if the specified child component was successfully added; otherwise, 0 is
returned.
The wsreg_remove_child_component() function returns a non-zero value if the specified child component was successfully removed; otherwise,
0 is returned.
The wsreg_get_child_components() function returns a null-terminated array of Wsreg_component pointers that represents the specified compo-
nent's list of child components. If the specified component has no child components, NULL is returned. The resulting array must be
released by the caller through a call to wsreg_free_component_array(). See wsreg_create_component(3WSREG).
USAGE
The parent-child relationship between components in the product install registry is used to record a product's structure. Product struc-
ture is the arrangement of features and components that make up a product. The structure of installed products can be displayed with the
prodreg GUI.
The child component must be installed and registered before the parent component can be. The registration of a parent component that has
child components results in each of the child components being updated to reflect their parent component.
Read access to the product install registry is required in order to use these functions because these relationships are held with light-
weight component references that can only be fully resolved using the registry contents.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
prodreg(1M), wsreg_can_access_registry(3WSREG), wsreg_create_component(3WSREG), wsreg_initialize(3WSREG), wsreg_register(3WSREG),
wsreg_set_parent(3WSREG), attributes(5)
SunOS 5.10 22 Sep 2000 wsreg_add_child_component(3WSREG)