Sponsored Content
Top Forums Shell Programming and Scripting Returning values from child to parent shell Post 78122 by blowtorch on Friday 15th of July 2005 02:44:14 PM
Old 07-15-2005
Strange, I redirected the output of child.sh just like you have. The script still works fine. Return value is still 100. Have you tried to do as I had said in my previous post? The "./child.sh" change?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Returning Values (shell Script)

I have an application on Informix 4GL, and I am invoking the shell script from the program, but I need to know if the shell script work fine or not, in order to continue the process. I know that we can use $? to get the final status but this is on unix command. How can I return a value from the... (3 Replies)
Discussion started by: jennifer01
3 Replies

2. Shell Programming and Scripting

returning to the parent shell after invoking a script within a script

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

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. Shell Programming and Scripting

Parent/child Korn shell script help

I have the following two Korn shell scripts: SHELL1.ksh #!/usr/bin/ksh nohup sas /abc/123/sasprogram1.sas & SHELL2.ksh #!/usr/bin/ksh ./SHELL1.ksh wait nohup sas /abc/123/sasprogram2.sas & My goal is to run SHELL1.ksh within SHELL2.ksh. SHELL1.ksh runs sasprogram1.sas. I would like... (1 Reply)
Discussion started by: sasaliasim
1 Replies

5. Homework & Coursework Questions

Need help with deleting childīs parent and child subprocess

1. The problem statement, all variables and given/known data: I need to make an program that in a loop creates one parent and five children with fork(). The problem i'm trying to solve is how to delete the parent and child of the childīs process. 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: WhiteFace
0 Replies

6. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

7. Shell Programming and Scripting

Propagate exist status from a child shell script to a parent.

Hi All, I have a parent shell script A and a child shell script B. 1). If a command i.e a mysqdump fails in shell script B fails then I trap the error with this code if ] then func_exit "Failed to export the cleaned DB1.${MYDBNAME} database to the ${MYARCHIVEDIR} directory"... (1 Reply)
Discussion started by: daveu7
1 Replies

8. Programming

two-way piping values between parent and child

Hello everyone. I'm pretty new to the topic of fork(), pipe() etc. All day I've been trying to make my code execute but it doesn't seem to be working the way I understand it. :wall: Anyway, my task is: Create a child process that will recive from its parent two intiger values. Than it will... (5 Replies)
Discussion started by: jakubs11
5 Replies

9. Shell Programming and Scripting

Child exiting and not returning to parent script

I am having a parent scripts which reads a file with child scripts name. I need to read one by one child script , execute it and 1. If child script fails send mail to the team with the log file 2. If the child script executes fine then proceed with the next child script execution. #!... (3 Replies)
Discussion started by: nw2unx123
3 Replies

10. Shell Programming and Scripting

Returning multiple values in Shell

Hi I have a code as the following #!/usr/bin/ksh set -x row() { a=$1 b=$2 c=$(($a + $b)) d=$(($a * $b)) echo $a $b } e=`row 2 3` set $e echo "The value of c is $c" echo "The value of d is $d" My requirement is I need to pass two arguments to a function and return two values... (5 Replies)
Discussion started by: Priya Amaresh
5 Replies
SVG::DOM(3pm)						User Contributed Perl Documentation					     SVG::DOM(3pm)

NAME
SVG::DOM - A library of DOM (Document Object Model) methods for SVG objects. SUMMARY
SVG::DOM provides a selection of methods for accessing and manipulating SVG elements through DOM-like methods such as getElements, getChildren, getNextSibling and so on. SYNOPSIS
my $svg=new SVG(id=>"svg_dom_synopsis", width=>"100", height=>"100"); my %attributes=$svg->getAttributes; my $group=$svg->group(id=>"group_1"); my $name=$group->getElementName; my $id=$group->getElementID; $group->circle(id=>"circle_1", cx=>20, cy=>20, r=>5, fill=>"red"); my $rect=$group->rect(id=>"rect_1", x=>10, y=>10, width=>20, height=>30); my $width=$rect->getAttribute("width"); my $has_children=$group->hasChildren(); my @children=$group->getChildren(); my $kid=$group->getFirstChild(); do { print $kid->xmlify(); } while ($kid=$kid->getNextSibling); my @ancestors=$rect->getParents(); my $is_ancestor=$group->isAncestor($rect); my $is_descendant=$rect->isDescendant($svg); my @rectangles=$svg->getElements("rect"); my $allelements_arrayref=$svg->getElements(); $group->insertBefore($newChild,$rect); $group->insertAfter($newChild,$rect); $rect = $group->replaceChild($newChild,$rect); $group->removeChild($newChild); my $newRect = $rect->cloneNode($deep); ...and so on... METHODS
@elements = $obj->getElements($element_name) Return a list of all elements with the specified name (i.e. type) in the document. If no element name is provided, returns a list of all elements in the document. In scalar context returns an array reference. @children = $obj->getChildren() Return a list of all children defined on the current node, or undef if there are no children. In scalar context returns an array reference. Alias: getChildElements(), getChildNodes() @children = $obj->hasChildren() Return 1 if the current node has children, or 0 if there are no children. Alias: hasChildElements, hasChildNodes() $ref = $obj->getFirstChild() Return the first child element of the current node, or undef if there are no children. $ref = $obj->getLastChild() Return the last child element of the current node, or undef if there are no children. $ref = $obj->getSiblings() Return a list of all children defined on the parent node, containing the current node. $ref = $obj->getNextSibling() Return the next child element of the parent node, or undef if this is the last child. $ref = $obj->getPreviousSibling() Return the previous child element of the parent node, or undef if this is the first child. $index = $obj->getChildIndex() Return the place of this element in the parent node's list of children, starting from 0. $element = $obj->getChildAtIndex($index) Returns the child element at the specified index in the parent node's list of children. $ref = $obj->getParentElement() Return the parent of the current node. Alias: getParent() @refs = $obj->getParentElements() Return a list of the parents of the current node, starting from the immediate parent. The last member of the list should be the document element. Alias: getParents() $name = $obj->getElementName() Return a string containing the name (i.e. the type, not the ID) of an element. Alias: getType(), getTagName(), getNodeName() $ref = $svg->getElementByID($id) Alias: getElementbyID() Return a reference to the element which has ID $id, or undef if no element with this ID exists. $id = $obj->getElementID() Return a string containing the ID of the current node, or undef if it has no ID. $ref = $obj->getAttributes() Return a hash reference of attribute names and values for the current node. $value = $obj->getAttribute($name); Return the string value attribute value for an attribute of name $name. $ref = $obj->setAttributes({name1=>$value1,name2=>undef,name3=>$value3}) Set a set of attributes. If $value is undef, deletes the attribute. $value = $obj->setAttribute($name,$value); Set attribute $name to $value. If $value is undef, deletes the attribute. $cdata = $obj->getCDATA() Return the cannonical data (i.e. textual content) of the current node. Alias: getCdata(), getData() $boolean = $obj->isAncestor($element) Returns 1 if the current node is an ancestor of the specified element, otherwise 0. $boolean = $obj->isDescendant($element) Returns 1 if the current node is a descendant of the specified element, otherwise 0. $boolean = $obj->insertBefore( $element, $child ); Returns 1 if $element was successfully inserted before $child in $obj $boolean = $obj->insertAfter( $element, $child ); Returns 1 if $element was successfully inserted after $child in $obj $boolean = $obj->insertSiblingBefore( $element ); Returns 1 if $element was successfully inserted before $obj $boolean = $obj->insertSiblingAfter( $element ); Returns 1 if $element was successfully inserted after $obj $element = $obj->replaceChild( $element, $child ); Returns $child if $element successfully replaced $child in $obj $element = $obj->removeChild( $child ); Returns $child if it was removed successfully from $obj $element = $obj->cloneNode( $deep ); Returns a new $element clone of $obj, without parents or children. If deep is set to 1, all children are included recursively. AUTHOR
Ronan Oger, ronan@roitsystems.com Martin Owens, doctormo@postmaster.co.uk SEE ALSO
perl(1), SVG, SVG::XML, SVG::Element, SVG::Parser, SVG::Manual <http://www.roitsystems.com/> ROIT Systems: Commercial SVG perl solutions <http://www.w3c.org/Graphics/SVG/> SVG at the W3C perl v5.14.2 2012-05-29 SVG::DOM(3pm)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy