Sponsored Content
Top Forums Programming code that reads commands from the standard i/p and executes the commands Post 302103753 by reborg on Sunday 21st of January 2007 09:53:10 AM
Old 01-21-2007
I'm saying this in simplistic terms but here is what happens in terms of processes:

Code:
   your shell
       +
       |
       +------Your application
                         +
                         |
                         +-------The command your program runs

If you make a change in the bootom node in this list it has no effect on the ones above it. You cannot chdir in the parent from a within a child.
 

10 More Discussions You Might Find Interesting

1. Linux

how to get source code of Unix commands?

Can anyone tell me how/where to get the source code for the unix commands like "ls ,finger,cp....etc" commands . I have tried very hard but failed so far. Thanks JAGDISH MACHHI (4 Replies)
Discussion started by: jagdish.machhi@
4 Replies

2. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

3. UNIX for Dummies Questions & Answers

taking a look at the code for some commands

just curious -- I was wondering if it's possible to open the file for a command and look at the code (say for the command more). I've just read about the PATH variable and the type command to find out where the file is, but when I tried to open the file, the terminal exited and logged me out. ... (3 Replies)
Discussion started by: Straitsfan
3 Replies

4. Shell Programming and Scripting

Executing Commands From Non-Standard Path (Changing user's PATH secretely???)

Hi: I have a requirement as below: I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l). When any user logs on and types... (2 Replies)
Discussion started by: ramesh_samane
2 Replies

5. UNIX for Advanced & Expert Users

Source code for Unix commands

hi Folks!! Just got a question in mind.... Is it possible for us to read the c code of the commands in the bin directory? I work on a LINUX server and i only see executables in the bin directory which i obviously can't read. Please help me regarding this. Thanks in advance and wishing you a very... (2 Replies)
Discussion started by: bdiwakarteja
2 Replies

6. Shell Programming and Scripting

how to run non-standard commands in bash script?

Hello All. I suspect that this will be a clear noob question, but I haven't been able to figure it out using the usual methods, so I turn to you. I've written a script to create input files for the quantum chemistry program NWCHEM. Generally you create an input file and then execute it by... (12 Replies)
Discussion started by: EinsteinMcfly
12 Replies

7. Shell Programming and Scripting

Code for running commands one after other

I need an if code in shell script where it should continue to further commands after succesfully installing the executable file. i.e. /run installer is continuing but in the middle it executes further commands like "cp /root/user which were given after /run installer. I want /runinstaller... (16 Replies)
Discussion started by: sriki32
16 Replies

8. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

9. Shell Programming and Scripting

Differences in printed commands after execution with same code

I have a korn shell script that executes a function which is stored in a common library. In the function there is obviously some code. Here is the line of code in the function in question: temp=`echo $status_cnt|tr -d ` When the shell script executes with set -x, I'm seeing that on most... (2 Replies)
Discussion started by: mjf
2 Replies

10. UNIX for Beginners Questions & Answers

Not able to execute standard commands on centos 7 server

I am not able to run basic commands on my centos 7 server. The PATH variable looks correct I think. I have not seen this before and not sure what to do next. Thank you :). # cd /usr/bin # ls bash: ls: command not found... Similar command is: 'lz' nano ~/.bashrc bash: nano: command not... (6 Replies)
Discussion started by: cmccabe
6 Replies
PPIx::Regexp::Node(3)					User Contributed Perl Documentation				     PPIx::Regexp::Node(3)

NAME
PPIx::Regexp::Node - Represent a container SYNOPSIS
use PPIx::Regexp::Dumper; PPIx::Regexp::Dumper->new( 'qr{(foo)}' )->print(); INHERITANCE
"PPIx::Regexp::Node" is a PPIx::Regexp::Element. "PPIx::Regexp::Node" is the parent of PPIx::Regexp, PPIx::Regexp::Node::Range and PPIx::Regexp::Structure. DESCRIPTION
This class represents a structural element that contains other classes. It is an abstract class, not instantiated by the lexer. METHODS
This class provides the following public methods. Methods not documented here are private, and unsupported in the sense that the author reserves the right to change or remove them without notice. child my $kid = $node->child( 0 ); This method returns the child at the given index. The indices start from zero, and negative indices are from the end of the list, so that "$node->child( -1 )" returns the last child of the node. children This method returns the children of the Node. If called in scalar context it returns the number of children. contains print $node->contains( $elem ) ? "yes " : "no "; This method returns true if the given element is contained in the node, or false otherwise. elements This method returns the elements in the Node. For a "PPIx::Regexp::Node" proper, it is the same as "children()". find my $rslt = $node->find( 'PPIx::Regexp::Token::Literal' ); my $rslt = $node->find( 'Token::Literal' ); my $rslt = $node->find( sub { return $_[1]->isa( 'PPIx::Regexp::Token::Literal' ) && $_[1]->ordinal < ord(' '); } ); This method finds things. If given a string as argument, it is assumed to be a class name (possibly without the leading 'PPIx::Regexp::'), and all elements of the given class are found. If given a code reference, that code reference is called once for each element, and passed $self and the element. The code should return true to accept the element, false to reject it, and ( for subclasses of "PPIx::Regexp::Node") "undef" to prevent recursion into the node. If the code throws an exception, you get nothing back from this method. Either way, the return is a reference to the list of things found, a false (but defined) value if nothing was found, or "undef" if an error occurred. find_parents my $rslt = $node->find_parents( sub { return $_[1]->isa( 'PPIx::Regexp::Token::Operator' ) && $_[1]->content() eq '|'; } ); This convenience method takes the same arguments as "find", but instead of the found objects themselves returns their parents. No parent will appear more than once in the output. The return is a reference to the array of parents if any were found. If none were found the return is false but defined. If an error occurred the return is "undef". find_first This method has the same arguments as "find", but returns either a reference to the first element found, a false (but defined) value if no elements were found, or "undef" if an error occurred. first_element This method returns the first element in the node. last_element This method returns the last element in the node. perl_version_introduced This method returns the maximum value of "perl_version_introduced" returned by any of its elements. In other words, it returns the minimum version of Perl under which this node is valid. If there are no elements, 5.000 is returned, since that is the minimum value of Perl supported by this package. perl_version_removed This method returns the minimum defined value of "perl_version_removed" returned by any of the node's elements. In other words, it returns the lowest version of Perl in which this node is "not" valid. If there are no elements, or if no element has a defined "perl_version_removed", "undef" is returned. schild This method returns the significant child at the given index; that is, "$node->schild(0)" returns the first significant child, "$node->schild(1)" returns the second significant child, and so on. Negative indices count from the end. schildren This method returns the significant children of the node. SUPPORT
Support is by the author. Please file bug reports at <http://rt.cpan.org>, or in electronic mail to the author. AUTHOR
Thomas R. Wyant, III wyant at cpan dot org COPYRIGHT AND LICENSE
Copyright (C) 2009-2013 by Thomas R. Wyant, III This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. perl v5.16.3 2014-06-10 PPIx::Regexp::Node(3)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy