One more thing, if i want to extract the filename as well from filename.tar.gz file & get the count accordingly for match counter and not match counter, how would i do?
---------- Post updated at 10:00 PM ---------- Previous update was at 06:00 PM ----------
hi pamu,
when i tried removing BEGIN it gave an error, below is the code
Can you please suggest
I don't know what you're trying to do, but there are a few obvious problems. Since I don't know what you're trying to do, I haven't made any attempt to test the following suggestion.
In earlier posts in this thread you were using zcat to unzip a compressed tar file. The code in orange in your script is now using cat instead of zcat???
The code in red in your script sets a variable named "mon" (and never uses it) and uses a variable named "month" (that has never been set).
And as shown by the diagnostic messages you're getting from awk, your if statement, is not using the correct syntax.
The following seems to fix the obvious issues above:
The changes marked in red are crucial; the other changes are editorial.
I don't see how this script can do anything useful with a tar file, but I haven't made any changes to account for that. Your if statement might make sense (although I didn't look at the definition of a tar header block to confirm it) if it was only looking at tar headers, but this script is looking at every line in the tar file (headers and archived file contents).
Attached are views of the components of a dummy Access database. The database represents an example of the problem that has reared its ugly head.
The query example is a simple "Selection" query, which, after getting it to work, will become an "Append" query. The selected data will be appended... (1 Reply)
Hi all!
A bit of background: I am trying to create a script that formats SQL statements. I have gotten so far as to add new lines based on certain match criteria like commas, keywords etc. In the process, I end up adding newlines where I don't want.
For example: substr(colName, 1, 10)... (3 Replies)
Hi,
I have code which is like this
<TABLE name="UsageDetail_24>
<ROW>
<Date24><!]></Date24>
<Time24><!]></Time24>
<Destination24><!]></Destination24>
<Rate24><!]></Rate24>
<Duration24><!]></Duration24>
<Cost24><!]></Cost24>
<Allowance24><!]></Allowance24>
</ROW>
<ROW>... (3 Replies)
I have a business requirement in my project where I need to calculate the 12th working day of every month. Can any please tell me the solution to my problem.
Thanks in advance (7 Replies)
Hey guys, maybe you can help me with this...
I want to read input.dat line by line, while doing a simple calculation between the second column value of the current line and the second column value of the next line (like a difference).
input is something like this:
0 3.945757
1 ... (1 Reply)
Hello,
Need help with following scenario.
A file contains following text:
{beginning of file}
New: This is a new record and it is not
on same line. Since I have lost touch with script
take this challenge and bring all this in one line.
New: Hello losttouch. You seem to be struggling... (4 Replies)
Hi All,
I have the following time stamp data in 2 columns
Date TimeStamp(also with milliseconds)
05/23/2012 08:30:11.250
05/23/2012 08:30:15.500
05/23/2012 08:31.15.500
.
.
etc
From this data I need the following output.
0.00( row1-row1 in seconds)
04.25( row2-row1 in... (5 Replies)
Hi
I need to select lines from a txt file, I have got a line starting with ZMIO:MSISDN= and after a few line I have another line starting with 'MOBILE STATION ISDN NUMBER' and another one starting with 'VLR-ADDRESS' I need to copy these three lines as three different columns in a separate... (3 Replies)
Hi All,
I have following input file. I wish to retain those lines which match multiple search criteria. The search criteria is stored in a variable seperated from each other by comma(,).
SEARCH_CRITERIA = "REJECT, DUPLICATE"
Input File:
ERROR,MYFILE_20130214_11387,9,37.75... (3 Replies)