Sponsored Content
Full Discussion: Count log Entries
Top Forums Shell Programming and Scripting Count log Entries Post 35355 by Perderabo on Tuesday 8th of April 2003 01:34:59 PM
Old 04-08-2003
Here is an example of how to read the file and select only the lines for a given month:
Code:
#! /usr/bin/ksh
givenmonth=3
exec < datafile
read titleline
while read Date Time W220A WI220B W220C W223A ; do
        month=${Date%%/*}
        ((month != givenmonth)) && continue
        echo $Date $W220A $WI220B $W220C $W223A
done
exit 0

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with scritp to count an specific word into a log

Hello my friends, I need to count how many words are into a log file, I'm using: cat logfile | grep 'word' | wc -l Cuz the 'word' appears once per line. But my logfile grow faster and at the end ofthe day is really big, so how i can count the 'word' only from (by example) line 4000 of... (5 Replies)
Discussion started by: lestat_ecuador
5 Replies

2. Shell Programming and Scripting

taking count of log files and den performing some actions

hi, I've some log files in a path /SYSTEM/custom/data/MNP/xmlerror as: MNP_PORT_IN_P200902191347563283_20090220181630_err_1.xml MNP_PORT_IN_P200902171717114365_20090220211814_err_2.xml MNP_PORT_IN_P200902191349023233_20090220181923_err_1.xml... (4 Replies)
Discussion started by: ss_ss
4 Replies

3. Shell Programming and Scripting

How to collect count of a column from log file??

Hi All, I have an Output from a log file which is something like as follows.. ***** CDR and SDR Statistics**** Wed Feb 25 00:05:00 EST 2009 *********CDR and SDR QUEUE STATUS***** Queue busy wait msgs cdr 2 2 4 sdr ... (3 Replies)
Discussion started by: nirmal84
3 Replies

4. Shell Programming and Scripting

awk script to count percentage from log file

Hi, I have a log like this : actually i want to get the log like this : where % can get from : 100 * pmTotNoRrcConnectReqSucc / pmTotNoRrcConnectReq Thanks in advance.. :) (8 Replies)
Discussion started by: justbow
8 Replies

5. Shell Programming and Scripting

Count number of Nodes created and write it to a Log file

Dear Experts, I have to count the number of AddressRecords formed in bbc.xml file using unix script file. For example: for below pasted file, I need to write an output to a log file as "No. of Address Records Created=4". Snippet of bbc.xml:- <?xml version="1.0" encoding="UTF-8" ?> -... (1 Reply)
Discussion started by: phani333
1 Replies

6. Shell Programming and Scripting

Count of matched pattern occurences by time in a log file

We have a log file, the format is similar to this: 08/04/2011 05:03:08 Connection Success 08/04/2011 05:13:18 Connection Success 08/04/2011 05:23:28 Connection Fail 08/04/2011 05:33:38 Connection Success 08/04/2011 06:14:18 Connection Success 08/04/2011 06:24:28 Connection Fail 08/04/2011... (6 Replies)
Discussion started by: clu
6 Replies

7. Shell Programming and Scripting

Need to count files & create log of that.

Hi Friends, I need some help. First look at my files hierchachy /<level-1>/<level-2>/<level-3>/*.tif eg. : /2010-07-01/AFFIDAVIT-OF-SERVICE---FOR-SC/001/Babylon2_20100701012049_1278004849.49892_000.tif... (2 Replies)
Discussion started by: paragnehete
2 Replies

8. UNIX for Advanced & Expert Users

Count number of unique patterns from a log file

Hello Everyone I need your help in fixing this issue., I have a log file which has data of users logging in to an application. I want to search for a particular pattern in the log ISSessionValidated=N If this key word is found , the above 8 lines will contain the name of the user who's... (12 Replies)
Discussion started by: xtechkid
12 Replies

9. Shell Programming and Scripting

Count from the log file

I have a logfile which would be generated for every process and the log file looks like process1_ddmmyyyy_hhmmss.log ..there would be a log file generated after completion of the process but that would have a different name based on the timestamp. I can use ls -1 -rt | tail -1 but this would... (1 Reply)
Discussion started by: halfafringe
1 Replies

10. Shell Programming and Scripting

Use awk to count and rearrange entries

How can I use awk to count the occurrence of field 2 and rearrange the output like below: Input: OA1 FM AA OA0 FM CC ON0 FM CC FN1 FN BB OY1 FN BB OY2 FN CC OY3 FN CC YT0 FM AA KW1 FN CC KW3 FM BB YT4 FM AA FN2 FT BB OA3 FT AA ON7 FM BB (14 Replies)
Discussion started by: aydj
14 Replies
sbig5(5)							File Formats Manual							  sbig5(5)

NAME
sbig5 - A character encoding system (codeset) for Traditional Chinese DESCRIPTION
The Shift Big-5 (sbig5) codeset is a variant of the Big-5 codeset (see big5(5)). The only difference between these codesets is that the second byte of some Big-5 characters are mapped to different values in the Shift Big-5 codeset. The remapping is done to avoid having some metacharacters like *, which has special meaning to UNIX commands, in the second byte of a 2-byte Big-5 character. The mappings of Big-5 characters to Shift Big-5 characters are as follows: ------------------------------------------------------------------------ Big-5 (2nd Character Symbol Shift Big-5 (2nd Character Symbol byte) byte) ------------------------------------------------------------------------ 40 @ 30 0 5B [ 31 1 5C 32 2 5D ] 33 3 5E ^ 34 4 5F - 35 5 60 ` 36 6 7B { 37 7 7C | 38 8 7D } 39 9 7E ~ 9F nil ------------------------------------------------------------------------ The sbig5 codeset is not supported by a locale but only through codeset conversion. Codeset Conversion The following codeset converter pairs are available for converting Traditional Chinese characters between sbig5 and other encoding formats. Refer to iconv_intro(5) for an introduction to codeset conversion. For more information about the other codeset for which sbig5 is the input or output, see the reference page specified in the list item. big5_sbig5, sbig5_big5 Converting from and to the Big-5 codeset: big5(5). Note that Big-5 encoding is equivalent to the Microsoft code-page format used on PCs for Traditional Chinese. Therefore, you can use these converters to convert Traditional Chinese between PC code-page format and Shift Big-5 encoding. eucTW_sbig5, sbig5_eucTW Converting from and to Taiwanese Extended UNIX Code: eucTW(5). SEE ALSO
Commands: locale(1) Others: ascii(5), big5(5), Chinese(5), code_page(5), dechanyu(5), dechanzi(5), eucTW(5), GBK(5), i18n_intro(5), i18n_printing(5), iconv_intro(5), l10n_intro(5), telecode(5) sbig5(5)
All times are GMT -4. The time now is 03:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy