When you remove the XML Tree, the complete piece of code is only a single line. I used CUT command to pull by the column wise(Each byte is one column) of the expression, but the output varies from one log to another some thing like this.
Code:
>Failed to establish a backside connection>Error.800</ns1:providerErrorCode><ns1:providerErrorText>Communication error
d to establish a backside connection</ns1:r.800</ns1:providerErrorCode><ns1:providerErrorText>Communication error</ns1:
ed to establish a backside connection</ns1er.800</ns1:providerErrorCode><ns1:providerErrorText>Communication error</ns1
d to establish a backside connection</ns1:r.800</ns1:providerErrorCode><ns1:providerErrorText>Communication error</ns1:
t>Failed to establish a backside connectioe>error.800</ns1:providerErrorCode><ns1:providerErrorText>Communication erro
I tested your perl script but still getting error
Code:
perl -nle 'if (/<ns1:providerError(Code|Text)>(.+?)<\/ns1:providerError(Code|Text)>/) {print $_;}'dealerlistservice_Log[1-5]_2010*.log.gz
Bareword found where operator expected at -e line 1, near "]_2010"
(Missing operator before _2010?)
Warning: Use of "log" without parentheses is ambiguous at -e line 1.
syntax error at -e line 1, near "dealerlistservice_Log["
Execution of -e aborted due to compilation errors.
Last edited by Franklin52; 09-13-2010 at 06:53 AM..
Reason: Adding noparse tabs
I have more than 1000 files to parse. Each file contains few lines (number of lines varies) followed by a header line having all column's name (SPOT, NAME etc) and then values for those columns.
**Example File:
sdgafh
dfhaadfha
sfgaf dhah jkthdj
SPOT NAME GENE_NAME CH_MEAN CHDN_MED ... (11 Replies)
We have an input XML of the following form
<item>
<account>1234</account>
<id>345</id>
</item>
How do we get the value of <account> tag (1234) using UNIX ? (6 Replies)
i need one help, below is one more xml file with diff pattern i tried it but dint get it , iam sure its a peice of cake for you guys.
<xn:MeContext id="LSVLKY001">
<xn:ManagedElement id="1">
<un:RncFunction id="1">
<un:UtranCell... (2 Replies)
I would like to match the regular below xml snippet by using the following grep command. I want match the lines as well could some please help me ..
grep -il "<tokenValue>.*.</tokenValue>\n...*.amey.*.</userName>"
... (6 Replies)
Hello,
I'm attempting to extract 13 digit numbers beginning with 978 from a data file with the following command:
awk '{ for(i=1;i<=NF;i++) if($i ~ /^978/) print $i; }' datafile > outfile
This typically works. However, the new data file is an .xml file, and this command is no longer working... (6 Replies)
Hi ,
I have a situation where I need to search an xml file for the presence of a tag
<FollowOnFrom> and also , presence of partial part of the following tag <ContractRequest _LoadId and if these 2 exist ,then
extract the value from the following tag <_LocalId> which is
"CW2094139". There... (2 Replies)
Discussion started by: paul1234
2 Replies
LEARN ABOUT CENTOS
gzgrep
GZGREP(1) General Commands Manual GZGREP(1)NAME
gzgrep, gzegrep, gzfgrep - search possibly compressed files for a regular expression
SYNOPSIS
gzgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
gzgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci-
fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and
fed to grep.
If gzgrep is invoked as gzegrep or gzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, gzgrep
uses it as the grep program to be invoked. For example:
for sh: GREP=fgrep gzgrep string files
for csh: (setenv GREP fgrep; gzgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), egrep(1), fgrep(1), gzdiff(1), gzmore(1), gznew(1), gzforce(1), gzip(1), gzexe(1)ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWgzip |
+--------------------+-----------------+
|Interface Stability | External |
+--------------------+-----------------+
NOTES
Source for gzip is available in the SUNWgzipS package.
GZGREP(1)