Sponsored Content
Full Discussion: File Scan
Top Forums Shell Programming and Scripting File Scan Post 302113644 by Dastard on Sunday 8th of April 2007 09:21:09 AM
Old 04-08-2007
CPU & Memory File Scan

Hi everyone , i m working on Sun solaris and i have a file "smsapp.cur" which has information like this paragraph given below , there are millions of such paragraphs

From:923212802736
To:923222326807
logMessage: 07-04-08 17:34:29 Getting message topup from code page default in language English using encoding UTF-8
logMessage: /----------------------------------------
logMessage: |RESPONSE: (139)

logMessage: |----------------------------------------
logMessage: |0000: 44 65 61 72 20 63 75 73 74 6f 6d 65 72 2c 20 61 Dear customer, a
logMessage: |0016: 63 63 6f 75 6e 74 20 39 32 33 32 32 32 33 32 36 ccount 923222326
logMessage: |0032: 38 30 37 20 68 61 73 20 62 65 65 6e 20 73 75 63 807 has been suc
logMessage: |0048: 63 65 73 73 66 75 6c 6c 79 20 74 6f 70 70 65 64 cessfully topped
logMessage: |0064: 20 75 70 20 77 69 74 68 20 52 73 20 37 30 2e 30 up with Rs 70.0
logMessage: |0080: 30 2c 20 79 6f 75 72 20 6e 65 77 20 61 63 63 6f 0, your new acco
logMessage: |0096: 75 6e 74 20 62 61 6c 61 6e 63 65 20 69 73 20 52 unt balance is R
logMessage: |0112: 73 20 36 39 35 2e 38 33 2e 20 52 45 46 49 44 3a s 695.83. REFID:
logMessage: |0128: 20 32 32 38 31 33 39 37 38 34 2e 228139784.
logMessage: \----------------------------------------
logMessage: 07-04-08 17:34:29 Sending message to 923212802736
STKApp:run()::Sun Apr 08 17:34:29 PKT 2007::INBOX MESSAGES Length:1
logMessage: 07-04-08 17:34:29 Using product: P2P topup SKU:72
logMessage: 07-04-08 17:34:29 STKRequestProcessor:run()::Entered before calling processMessage()
logMessage: 07-04-08 17:34:29 SMSRequestProcessor: From: 923214330174, Message: B 03224906929 20
logMessage: type=B
msisdn=03224906929
amount=20

Amount:Rs 20.00




Now what i want is that somehow i only get responce code line ( which i have set as italic ) between certain time stamps like since yesterdays 04:00 pm till todays 03:00 AM

i have tried something like this

function while_read_LINE
{
cat $FILENAME | while read LINE
do
find "RESPONCE" $LINE > responce.txt
:
done
}

but i donno how to cater time stamp

Regards and Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to scan only new lines added in file?

Hi, I am planning to implement a scheduled script that will go against my log files (every hour), search for a set of key words (errors, exceptions, faults etc). The script must be intelligent enough to scan only the new lines added to the log file since it last ran. I can use grep for... (3 Replies)
Discussion started by: redlotus72
3 Replies

2. Shell Programming and Scripting

How to scan a file for literal, return 0 or 1 if found?

How can i scan a file in a UNIX script and look for a particular keyword? For example if i wanted to scan the file "lpcmp165.out" and see if it contains the term "error" or "ERROR" and then return a 0 or 1 or some indicator as such? Detail example: sqlplus -s xx/yyyyyyy#@zzz <<EOF >... (11 Replies)
Discussion started by: bobk544
11 Replies

3. Shell Programming and Scripting

File Inventory Scan

Is there such a script out there that will Analyze a folder and subfolders, getting file type utilization and file aging. A CSV file will be created with file information File,Size,Date Created,Last Modified,Last Accessed,Extension,File Type,Owner A Summary report text file will also be created... (4 Replies)
Discussion started by: seacros
4 Replies

4. Shell Programming and Scripting

how to scan a sequential file to fetch some of the records?

Hi I am working on a script which needs to scan a sequential file and fetch the row where 2nd column = 'HUB' Can any one help me with this... Thanks (1 Reply)
Discussion started by: manmeet
1 Replies

5. Shell Programming and Scripting

Scan a log file

hi guys, i am very new to scripting & lookin for a shell script/perl script which would scan another file with the keyword "no change" & take a count of the same. Let me know if any further details are required. (3 Replies)
Discussion started by: nhanda
3 Replies

6. Shell Programming and Scripting

Log File Scan

I need to read the last line of a log file and save it, sleep for X minutes and read the last line again. If the line is the same, exit 1, otherwise sleep for X minutes until the last line contains 'Status: Process completed'. Can anyone offer advice here? Thanks. (2 Replies)
Discussion started by: mode09
2 Replies

7. Shell Programming and Scripting

Scan log file for errors

Hi everyone. I am still new to UNIX, and am having trouble figuring out how to create a script to scan a log file to look for errors based on a string. We run AIX 5.3, and would like the ability to report all the instances of WebSphere Broker Execution groups crashing. This script would... (8 Replies)
Discussion started by: jimbojames
8 Replies

8. Red Hat

Scan for new LUN and create a new file system

Hi Please I dont have a lot of redhat skills, but I need some help on creating a file system. I need to rescan for this new LUN, so I try to check existing LUNs: fdisk -l Disk /dev/sda: 299.4 GB, 299439751168 bytes 255 heads, 63 sectors/track, 36404 cylinders Units = cylinders of... (8 Replies)
Discussion started by: fretagi
8 Replies

9. Ubuntu

Scan and create file systems in new LUNs

Hi I have a system running uname -a Linux cmoveldb02 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux and I was told by the NetApp Admin that he has provided 5 LUNs of 1Tb, 200Gb and remaining 3 of 300Gb, but I am not able to see the new LUNs. I have... (4 Replies)
Discussion started by: fretagi
4 Replies

10. Shell Programming and Scripting

Scan and remove if file infected using bash

The below bash runs clamav on all files in DIR and produces virus-scan.log. My question is the portion in bold is supposed to move the infected files, lines not OK, to /home/cmccabe/quarantine. Does the bash look correct? Thank you :). virus-scan.log Mon Jan 16 14:39:05 CST 2017... (5 Replies)
Discussion started by: cmccabe
5 Replies
fribidi_get_par_direction(3)					Programmer's Manual				      fribidi_get_par_direction(3)

NAME
fribidi_get_par_direction - get base paragraph direction SYNOPSIS
#include <fribidi.h> FriBidiParType fribidi_get_par_direction ( const FriBidiCharType *bidi_types, const FriBidiStrIndex len ); PARAMETERS
const FriBidiCharType *bidi_types Input list of bidi types as returned by fribidi_get_bidi_types(). Possible values for a const FriBidiCharType are as follows: FRIBIDI_TYPE_LTR Left-To-Right letter. FRIBIDI_TYPE_RTL Right-To-Left letter. FRIBIDI_TYPE_AL Arabic Letter. FRIBIDI_TYPE_EN European Numeral. FRIBIDI_TYPE_AN Arabic Numeral. FRIBIDI_TYPE_ES European number Separator. FRIBIDI_TYPE_ET European number Terminator. FRIBIDI_TYPE_CS Common Separator. FRIBIDI_TYPE_NSM Non Spacing Mark. FRIBIDI_TYPE_BN Boundary Neutral. FRIBIDI_TYPE_BS Block Separator. FRIBIDI_TYPE_SS Segment Separator. FRIBIDI_TYPE_WS WhiteSpace. FRIBIDI_TYPE_ON Other Neutral. FRIBIDI_TYPE_LRE Left-to-Right Embedding. FRIBIDI_TYPE_RLE Right-to-Left Embedding. FRIBIDI_TYPE_LRO Left-to-Right Override. FRIBIDI_TYPE_RLO Right-to-Left Override. FRIBIDI_TYPE_PDF Pop Directional Flag. const FriBidiStrIndex len Input string length. DESCRIPTION
This function finds the base direction of a single paragraph, as defined by rule P2 of the Unicode Bidirectional Algorithm available at http://www.unicode.org/reports/tr9/#P2. You typically do not need this function as fribidi_get_par_embedding_levels() knows how to compute base direction itself, but you may need this to implement a more sophisticated paragraph direction handling. Note that you can pass more than a paragraph to this function and the direction of the first non-neutral paragraph is returned, which is a very good heuristic to set direction of the neutral paragraphs at the beginning of text. For other neutral paragraphs, you better use the direction of the previous paragraph. RETURNS
Base pargraph direction. No weak paragraph direction is returned, only LTR, RTL, or ON. Possible values for a FriBidiParType are as follows: FRIBIDI_PAR_LTR Left-To-Right paragraph. FRIBIDI_PAR_RTL Right-To-Left paragraph. FRIBIDI_PAR_ON DirectiOn-Neutral paragraph. FRIBIDI_PAR_WLTR Weak Left To Right paragraph. FRIBIDI_PAR_WRTL Weak Right To Left paragraph. SEE ALSO
fribidi_charset_to_unicode(3), fribidi_unicode_to_charset(3), fribidi_parse_charset(3), fribidi_shape_arabic(3), fribidi_get_par_embed- ding_levels(3), fribidi_reorder_line(3), fribidi_get_bidi_type(3), fribidi_get_bidi_types(3), fribidi_get_bidi_type_name(3), fribidi_debug_status(3), fribidi_mirroring_status(3), fribidi_set_mirroring(3), fribidi_reorder_nsm_status(3), fribidi_set_reorder_nsm(3), fribidi_log2vis_get_embedding_levels(3), fribidi_get_type(3), fribidi_get_type_internal(3), fribidi_remove_bidi_marks(3), fribidi_log2vis(3), fribidi_join_arabic(3), fribidi_get_joining_type(3), fribidi_get_joining_types(3), fribidi_get_joining_type_name(3), fribidi_get_mirror_char(3), fribidi_shape_mirroring(3), fribidi_shape(3) GNU FriBidi 0.19.2 30 January 2006 fribidi_get_par_direction(3)
All times are GMT -4. The time now is 05:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy