09-26-2016
No surprise your output is empty, as your compound if condition won't ever be true with either of your input files. When a field $i == "expName", there's no "planExecuted" nor "true" anywhere nearby. Please reconsider/refine your condition.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have list of directory paths in a variable and i want to delete those dirs and if dir does not exist then search that string and get the correct path from xml file after that delete the correct directory. i tried to use grep and it prints the entire line from the search.once i get the entire... (7 Replies)
Discussion started by: dragon.1431
7 Replies
2. Shell Programming and Scripting
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies
3. Shell Programming and Scripting
awk experts,
I have a big file of 4000 columns with header. Would like to print the columns with string value of "Commands" in header. File has "," separator. This file is on ESX host with Bash.
Thanks,
Arv (21 Replies)
Discussion started by: arv_cds
21 Replies
4. UNIX for Dummies Questions & Answers
I'm still beginner and maybe someone can help me.
I have this input:
the great warrior a, b, c
and what i want to know is, with awk, how can i detect the string with 'warrior' string on it and print the a, b, and c seperately, become like this :
Warrior Type
a
b
c
Im still very... (3 Replies)
Discussion started by: radynaraya
3 Replies
5. Shell Programming and Scripting
Dear All,
I have input file like this,
001
059
079
996
758
079
069
059
079
...
...
Desired output:
AA 001
BB 059 (4 Replies)
Discussion started by: attila
4 Replies
6. Shell Programming and Scripting
I want to print from <fruits> to </fruits> tag which have <fruit> as mango. Also i want both <fruits> and </fruits> in output. Please help
eg.
<fruits>
<fruit id="111">mango<fruit>
.
another 20 lines
.
</fruits> (3 Replies)
Discussion started by: Ashik409
3 Replies
7. Shell Programming and Scripting
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies
8. Shell Programming and Scripting
hi gurus,
I would like to be able to use awk to process 1 file as such:
abc 1 2 3 4 5 6 7 8 9 10
flags 1 2 4
flags 1 2 5
abc 2 3 4 5 6 7 8 9 10 11
flags 1 2 3
abc 4 5 6 7 8 9 6 7 78 89
flags 1 2 3
flags 1 2 4
flags 1 2 3 4
I would like to be able to print field 1 and 5 when the... (4 Replies)
Discussion started by: revaroo
4 Replies
9. Shell Programming and Scripting
The below awk is used with the attached index.html and matches the specific user id in the sub portion with path of /rundb/api/v1/plugin/49/. The command does run but the output is blank. Something changed in the file structure as it used to work.
So using the first line in the output:
... (2 Replies)
Discussion started by: cmccabe
2 Replies
10. Shell Programming and Scripting
File2 is tab-delimeted and I am trying to use $2 in file1 (space delimeted) as a search term in file2. If it is found then the AF= in and the FDP= values from file2 are extracted and printed next to the file1 line. I commented the awk before I added the lines in bold the current output resulted. I... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT MOJAVE
ppi::statement::compound5.18
PPI::Statement::Compound(3) User Contributed Perl Documentation PPI::Statement::Compound(3)
NAME
PPI::Statement::Compound - Describes all compound statements
SYNOPSIS
# A compound if statement
if ( foo ) {
bar();
} else {
baz();
}
# A compound loop statement
foreach ( @list ) {
bar($_);
}
INHERITANCE
PPI::Statement::Compound
isa PPI::Statement
isa PPI::Node
isa PPI::Element
DESCRIPTION
"PPI::Statement::Compound" objects are used to describe all current forms of compound statements, as described in perlsyn.
This covers blocks using "if", "unless", "for", "foreach", "while", and "continue". Please note this does not cover "simple" statements
with trailing conditions. Please note also that "do" is also not part of a compound statement.
# This is NOT a compound statement
my $foo = 1 if $condition;
# This is also not a compound statement
do { ... } until $condition;
METHODS
"PPI::Statement::Compound" has a number of methods in addition to the standard PPI::Statement, PPI::Node and PPI::Element methods.
type
The "type" method returns the syntactic type of the compound statement.
There are four basic compound statement types.
The 'if' type includes all variations of the if and unless statements, including any 'elsif' or 'else' parts of the compound statement.
The 'while' type describes the standard while and until statements, but again does not describes simple statements with a trailing while.
The 'for' type covers the C-style for loops, regardless of whether they were declared using 'for' or 'foreach'.
The 'foreach' type covers loops that iterate over collections, regardless of whether they were declared using 'for' or 'foreach'.
All of the compounds are a variation on one of these four.
Returns the simple string 'if', 'for', 'foreach' or 'while', or "undef" if the type cannot be determined.
TO DO
- Write unit tests for this package
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.18.2 2011-02-25 PPI::Statement::Compound(3)