Sponsored Content
Full Discussion: Question in shell scripting
Top Forums Shell Programming and Scripting Question in shell scripting Post 302605753 by drl on Thursday 8th of March 2012 12:00:47 PM
Old 03-08-2012
Hi.

Welcome to the forum.

Thanks for text description of what you want.

I would help me to see a bit more graphically what you mean. For example, use command tree to help:
Code:
% tree -F d1
d1
|-- a.c
|-- a.out*
|-- b.c
|-- d11/
|   |-- (etc)
|   `-- f.c
`-- x.dat

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Scripting Question

To anyone who can help greetings, I am a beginner at Unix shell scripting and am taking a class. The assignment question is as follows: use a command-line tool named "itstat" which will display the resolution of an image file and some other lines of information. It accepts a list of image... (1 Reply)
Discussion started by: tech2040
1 Replies

2. Shell Programming and Scripting

Shell Scripting Question

To anyone who can help greetings, I am a beginner at Unix shell scripting. I need to know how to use the command line tool "itstat". I understand it's application, however I cannot find any additional information. Any assistance will be greatly appreciated. (3 Replies)
Discussion started by: tech2040
3 Replies

3. UNIX for Dummies Questions & Answers

shell scripting newbie question

Hi all! I'm a newbie to shell scripting. I want to create a script that will store a line from a text file in a variable so I can then use it to open firefox with that text in the address bar (the text file contains a list of addresses). I have tried the following: #!/bin/sh a='sed -n 2p... (2 Replies)
Discussion started by: jazzman
2 Replies

4. UNIX for Dummies Questions & Answers

Shell Scripting Question

Hi, I am assaigning the output to the variable outp and when i try to loop thru the variable i see the original content $OUTPUT also in the array outp. I dont want to have the original content in the array outp. Please reply. outp=$(echo $OUTPUT | awk '{FS = "|"}{ for(i=0;i<NF;i++)... (8 Replies)
Discussion started by: vijaykrc
8 Replies

5. Shell Programming and Scripting

scp shell scripting question

HI all, I am attempting to use the scp statemet in a shell script that I am writing I need to have the user of the script enter a password at the time of the shell script running.I have the following questions? 1) how do i disable the automatic text echo when the user is entering the... (1 Reply)
Discussion started by: Segwar
1 Replies

6. UNIX for Dummies Questions & Answers

shell scripting question

Testing for the presence/absence of a pattern in a file, using /bin/sh: while read a; do b="${a##*pattern*}"; ; done < file This returns 0 if there's a match. That signal ($?) can then be used outside the loop. However this method reads through the whole file, even if the match... (2 Replies)
Discussion started by: uiop44
2 Replies

7. Shell Programming and Scripting

Shell scripting question (Fedora 16)

Hi, I need to write a script that runs a series of commands in multiple subfolders. The problem is that I dont want to change directory for every folder. So this is why I thought to use a master script to activate the smaller ones. So, is there a way to command other scripts to open in... (9 Replies)
Discussion started by: Fuyudo
9 Replies

8. Shell Programming and Scripting

Shell Scripting Question

Hi guys, I am wanting to create a script that will logon to HackThisSite.org and complete Programming Mission 11. You can find a link to this mission here for your reference: www hackthissite org/missions/prog/11/ The following is what I have so far: #!/bin/bash USER="myUsername"... (0 Replies)
Discussion started by: spooke
0 Replies

9. Shell Programming and Scripting

Shell Scripting question with SQL

hey i have to connect to sql through shell script , then store the value of the query in a variable and then compare it after some time after running a process. i have used this code but it is not working. #!/bin/sh Val = (sqlplus -s rte/rted2@rel76d2 <<! SELECT MAX(STAT_ID) FROM CVT_STATS;... (3 Replies)
Discussion started by: ramsavi
3 Replies

10. Shell Programming and Scripting

Question regarding for shell scripting.

I tried to run a command which simply generates SSH key with out prompting password. After several trails , got the below command to run the script : ssh-keygen -t rsa -N "" -f id_rsa -N "" tells it to use an empty passphrase (the same as two of the enters in an interactive script) -f... (0 Replies)
Discussion started by: ulaxmi
0 Replies
Tree::Simple::Visitor::LoadClassHierarchy(3pm)		User Contributed Perl Documentation	    Tree::Simple::Visitor::LoadClassHierarchy(3pm)

NAME
Tree::Simple::Visitor::LoadClassHierarchy - A Visitor for loading class hierarchies into a Tree::Simple hierarchy SYNOPSIS
use Tree::Simple::Visitor::LoadClassHierarchy; # create an visitor my $visitor = Tree::Simple::Visitor::LoadClassHierarchy->new(); # set class as an instance, or $visitor->setClass($class); # as a package name $visitor->setClass("My::Class"); # pass our visitor to the tree $tree->accept($visitor); # the $tree now mirrors the inheritance hierarchy of the $class DESCRIPTION
This visitor will traverse a class's inheritance hierarchy (through the @ISA arrays) and create a Tree::Simple hierarchy which mirrors it. METHODS
new There are no arguments to the constructor the object will be in its default state. You can use the "setNodeFilter" method to customize its behavior. includeTrunk ($boolean) Setting the $boolean value to true(1) will cause the node value of the $tree object passed into "visit" to be set with the root value found in the class heirarchy. Setting it to false(0), or not setting it, will result in the first value in the class heirarchy creating a new node level. includeMethods ($boolean) Setting the $boolean value to true(1) will cause methods to be added as a children of the class node. Setting it to false(0), or not setting it, will result in this not happening. NOTE: Methods are sorted ascii-betically before they are added to the tree. This allows a more predictable heirarchy. setClass ($class) The argument $class should be either a class name or an instance, it is then used as the root from which to determine the class hierarchy. setNodeFilter ($filter_function) This method accepts a CODE reference as its $filter_function argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are created, the $filter_function is passed the node value extracted from the hash prior to it being inserted into the tree being built. The $filter_function is expected to return the value desired for inclusion into the tree. visit ($tree) This is the method that is used by Tree::Simple's "accept" method. It can also be used on its own, it requires the $tree argument to be a Tree::Simple object (or derived from a Tree::Simple object), and will throw and exception otherwise. The $tree argument which is passed to "visit" must be a leaf node. This is because this Visitor will create all the sub-nodes for this tree. If the tree is not a leaf, an exception is thrown. We do not require the tree to be a root though, and this Visitor will not affect any nodes above the $tree argument. TO DO
Improve the "includeMethods" functionality I am not sure the tree this creates is the optimal tree for this situation. It is sufficient for now, until I have more of an actual need for this functionality. Add "includeFullSymbolTable" functionality This would traverse the full symbol tables and produce a detailed tree of everything it finds. This takes a lot more work, and as I have no current need for it, it remains in the TO DO list. BUGS
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it. CODE COVERAGE
See the CODE COVERAGE section in Tree::Simple::VisitorFactory for more inforamtion. SEE ALSO
These Visitor classes are all subclasses of Tree::Simple::Visitor, which can be found in the Tree::Simple module, you should refer to that module for more information. AUTHOR
stevan little, <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2004, 2005 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2005-07-14 Tree::Simple::Visitor::LoadClassHierarchy(3pm)
All times are GMT -4. The time now is 01:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy