Sponsored Content
Full Discussion: Creating a PATH variable
Top Forums Shell Programming and Scripting Creating a PATH variable Post 303027953 by Circuits on Friday 28th of December 2018 01:08:36 PM
Old 12-28-2018
Quote:
Originally Posted by gull04
Hi Circuits,

Just a quick observation, the start function does not seem to be complete. The closing brace seems to be missing as does the command line entry to actually start the daemon.

However saying that there are entries in the script indicating that originally the start function may have been an entry in /etc/inittab, functionallity which I think has been mostly deprecated now.

Regards

Gull04



I accidentally deleted the closing brace when putting in my comments, that's my fault. Not sure about the command line entry to start the daemon.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating alias for directory path

I am trying to create an alias for a frequently used directory path by using alias xyz="/proj/dir_name" and then trying to reach a sub-directoy by using cd xyz/abc but I get an error saying " No such file or directory " plz tell me wats wrong with this ... (3 Replies)
Discussion started by: jasjot31
3 Replies

2. UNIX for Dummies Questions & Answers

creating a variable

I cannot seem to get the following script to work. I cannot seem to set the variable. What am I missing? bin/bash set -x echo "2" > /tmp/number STATUS='grep -c 2 /temp/number' if ; then echo "Number 2 is found once" else echo "Number 2 is found more or less than one time" fi (3 Replies)
Discussion started by: rexmabry
3 Replies

3. Shell Programming and Scripting

Getting the path from a variable

Hi, I am having a variable Like line="/dir1/dir2/gr3/file.ksh" I need to get the /dir1/dir2/gr3 alone. the no of directories may differ at each time. Please advice. thanks in advance. (3 Replies)
Discussion started by: vanathi
3 Replies

4. Shell Programming and Scripting

Sed variable substitution when variable constructed of a directory path

Hello, i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem. my var1 is a string constructed like this: filename1 filerev1 filepath1 my var2 is another string constructed like this: filename2 filerev2 filepath2 when i do... (2 Replies)
Discussion started by: alrinno
2 Replies

5. Shell Programming and Scripting

remove a path from PATH environment variable

Hi I need a script which will remove a path from PATH environment variable. For example $echo PATH /usr/local/bin:/usr/bin:test/rmve:/usr/games $echo rmv test/rmve Here I need a shell script which will remove rmv path (test/rmve) from PATH... (9 Replies)
Discussion started by: madhu84
9 Replies

6. Shell Programming and Scripting

one liner to extract path from PATH variable

Hi, Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable? for eg: suppose the PATH is being set as follows PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4 ... (2 Replies)
Discussion started by: royalibrahim
2 Replies

7. Shell Programming and Scripting

Appending a path in user's PATH variable

Hello Folks, I want to append a path in user's PATH variable which should be available in current session. Background Numerous persons will run a utility. Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

8. Shell Programming and Scripting

Path a variable to sed that includes a path

Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example start="BEGIN /home/mavkoup/data" end="END" sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies

9. Shell Programming and Scripting

File creating in another path.. application unable to locate

I am submitting a concurrent program (of HOST tyme) from Oracle apps screen, The MAIN shell program submits another program, (child) which is also a Shell program. The child writes data to log file. Now the main program, read the log and do some calculations and sends the data to user through... (1 Reply)
Discussion started by: Pradeep Garine
1 Replies

10. Shell Programming and Scripting

Readin document & creating path

Need a way to read a file in who every line is a path to a directory and make shortcut to that directory on a specific place. Example: line in the document /media/gogo/6651-FEAB/Desktop/ /media/gogo/6651-FEAB/Desktop/alex/ /media/gogo/6651-FEAB/linux/ ... (3 Replies)
Discussion started by: gogok_bg
3 Replies
PPI::Structure(3pm)					User Contributed Perl Documentation				       PPI::Structure(3pm)

NAME
PPI::Structure - The base class for Perl braced structures INHERITANCE
PPI::Structure isa PPI::Node isa PPI::Element DESCRIPTION
PPI::Structure is the root class for all Perl bracing structures. This covers all forms of " [ ... ] ", " { ... } ", and " ( ... ) " brace types, and includes cases where only one half of the pair exist. The class PPI::Structure itself is full abstract and no objects of that type should actually exist in the tree. Elements vs Children A PPI::Structure has an unusual existance. Unlike a PPI::Document or PPI::Statement, which both simply contain other elements, a structure both contains and consists of content. That is, the brace tokens are not considered to be "children" of the structure, but are part of it. In practice, this will mean that while the ->elements and ->tokens methods (and related) will return a list with the brace tokens at either end, the ->children method explicitly will not return the brace. STRUCTURE CLASSES
Excluding the transient PPI::Structure::Unknown that exists briefly inside the parser, there are eight types of structure. PPI::Structure::List This covers all round braces used for function arguments, in "foreach" loops, literal lists, and braces used for precedence-ordering purposes. PPI::Structure::For Although not used for the "foreach" loop list, this is used for the special case of the round-brace three-part semicolon-seperated "for" loop expression (the traditional C style for loop). PPI::Structure::Given This is for the expression being matched in switch statements. PPI::Structure::When This is for the matching expression in "when" statements. PPI::Structure::Condition This round-brace structure covers boolean conditional braces, such as for "if" and "while" blocks. PPI::Structure::Block This curly-brace and common structure is used for all form of code blocks. This includes those for "if", "do" and similar, as well as "grep", "map", "sort", "sub" and (labelled or anonymous) scoping blocks. PPI::Structure::Constructor This class covers brace structures used for the construction of anonymous "ARRAY" and "HASH" references. PPI::Structure::Subscript This class covers square-braces and curly-braces used after a -> pointer to access the subscript of an "ARRAY" or "HASH". METHODS
"PPI::Structure" itself has very few methods. Most of the time, you will be working with the more generic PPI::Element or PPI::Node methods, or one of the methods that are subclass-specific. start For lack of better terminology (like "open" and "close") that has not already in use for some other more important purpose, the two individual braces for the structure are known within PPI as the "start" and "finish" braces (at least for method purposes). The "start" method returns the start brace for the structure (i.e. the opening brace). Returns the brace as a PPI::Token::Structure or "undef" if the structure does not have a starting brace. Under normal parsing circumstances this should never occur, but may happen due to manipulation of the PDOM tree. finish The "finish" method returns the finish brace for the structure (i.e. the closing brace). Returns the brace as a PPI::Token::Structure or "undef" if the structure does not have a finishing brace. This can be quite common if the document is not complete (for example, from an editor where the user may be halfway through typeing a subroutine). braces The "braces" method is a utility method which returns the brace type, regardless of whether has both braces defined, or just the starting brace, or just the ending brace. Returns on of the three strings '[]', '{}', or '()', or "undef" on error (primarily not having a start brace, as mentioned above). complete The "complete" method is a convenience method that returns true if the both braces are defined for the structure, or false if only one brace is defined. Unlike the top level "complete" method which checks for completeness in depth, the structure complete method ONLY confirms completeness for the braces, and does not recurse downwards. SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2011-02-26 PPI::Structure(3pm)
All times are GMT -4. The time now is 02:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy