Hi,
I have to search those statements from the file which starts from "shanky"(only shanky, shanky09 or 09shanky is not allowed) and ends with ");". These two string can be in a same line or different line. And also i have to negate those lines which starts with #.
Can any one please give me... (2 Replies)
How can I pass $var_find variable as argment to find command?
test.sh
var_find=' \( -name "*.xml" -o -name "*.jsp" \) '
echo "${var_find}"
find . -type f ${var_find} -print
# Below statement works fine.. I want to replace this with the above..
#find . \( -name "*.xml" -o -name... (4 Replies)
Hello All,
I have a file which is having below type of data,
Jul 19 2011 | 123456
Jul 19 2011 | 123456
Jul 20 2011 | 123456
Jul 20 2011 | 123456
Here I wanted to grep for date pattern as below, so that it should only grep "Jul 20" OR "Jul ... (9 Replies)
user 10
values
content is:
musage.py
yes
value
user 11
values
content is:
gusage.py
yes
value
how to print "user" string line by searching "content is:" string and "usage.py" string in perl (8 Replies)
Hello :)
I have this file
cat employee_list
Name : jack
Gender: m
ID : 4512
DOB : 03/27/1980
hire date : 04/23/2012
Nationality: US
marital status : single
=====================
Name : mick
Gender: m
ID : 1256
DOB : 03/27/1970
Hire date : 012/10/2011
Nationality: US
Marital... (4 Replies)
Want to fetch a column with multiple pattern using awk.
How to achieve the same.
Tried
cat test
address : 10.63.20.92/24
address : 10.64.22.93/24
address : 10.53.40.91/24
cat test | awk '{print $3}' |awk -F "/" '{print $1}'
10.63.20.92
10.64.22.93
10.53.40.91
Is there any... (2 Replies)
I am working on AIX operating system.
I want to search list of Article Id for given Set Date (which are present in a seperate file input.txt)
art_list.csv
------------
"Article ID" |"Ad Description" |"Pyramid"|"Pyramid Desc "|"ProductTypeId"|"Set Date "|... (3 Replies)
#!/usr/bin/ksh
a="Run successfully"
cd $APPS
ls -l *.txt | while read $txt
do
if then
cp $APPS/$txt cp $hist/$txt
else
rm $APPS/$txt
echo "Files has been removed"
fi
done
New in shell script please help me out
Around 100 txt files in $APPS dir i want to search pattern from... (8 Replies)
Discussion started by: Kalia
8 Replies
LEARN ABOUT DEBIAN
tree::simple::visitor::postordertraversal
Tree::Simple::Visitor::PostOrderTraversal(3pm) User Contributed Perl Documentation Tree::Simple::Visitor::PostOrderTraversal(3pm)NAME
Tree::Simple::Visitor::PostOrderTraversal - A Visitor for post-order traversal a Tree::Simple hierarchy
SYNOPSIS
use Tree::Simple::Visitor::PostOrderTraversal;
# create an visitor
my $visitor = Tree::Simple::Visitor::PostOrderTraversal->new();
# pass our visitor to the tree
$tree->accept($visitor);
# print our results
print join ", " => $visitor->getResults();
# this will print this:
# 1.1.1 1.1 1.2 1 2.1 2 3.1 3
# assuming your tree is like this:
# 1
# 1.1
# 1.1.1
# 1.2
# 2
# 2.1
# 3
# 3.1
DESCRIPTION
Post-order traversal is a variation of the depth-first traversal in which the sub-tree's are processed before the parent. It is another
alternative to Tree::Simple's "traverse" method which implements a depth-first, pre-order traversal.
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)
Based upon the value of $boolean, this will tell the visitor to include the trunk of the tree in the traversal as well.
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 collected. This can be used to customize output, or to gather specific
information from a more complex tree node. The filter function should accept a single argument, which is the current Tree::Simple
object.
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.
getResults
This method returns the accumulated results of the application of the node filter to the tree.
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::PostOrderTraversal(3pm)