Sponsored Content
Top Forums Shell Programming and Scripting Getting info from a huge log file Post 302554456 by yazu on Monday 12th of September 2011 06:00:23 AM
Old 09-12-2011
Well, for this kind of problems is very hard to give you an exact solution. Something changes and you need other solution. The structure of data you give is defined a little wrong and a solution can be wrong or it can take hours instead of minutes. If you are in this buisness (text/file processing) you really should take some time and learn and understand the basics at least.

Ok, there is I was wrong and you need $7 not $6 (you have the additonal first empty field).

And about -F option - when you assign it to one symbol, you get just symbol as the field separator. When you assign it to a string, you get a regex. '|' divides your strings to 7 fields, and ':\\|' divides to two.
 

10 More Discussions You Might Find Interesting

1. Linux

Searching for gaps in huge (2.2G) log file?

I've got a 2.2 Gig syslog file from our Cisco firewall appliance. The problem is that we've been seeing gaps in the syslog for anywhere from 10 minutes to 2 hours. Currently I've just been using 'less' and paging through the file to see if I can find any noticeable gaps. Obviously this isn't the... (3 Replies)
Discussion started by: deckard
3 Replies

2. Shell Programming and Scripting

insert a header in a huge data file without using an intermediate file

I have a file with data extracted, and need to insert a header with a constant string, say: H|PayerDataExtract if i use sed, i have to redirect the output to a seperate file like sed ' sed commands' ExtractDataFile.dat > ExtractDataFileWithHeader.dat the same is true for awk and... (10 Replies)
Discussion started by: deepaktanna
10 Replies

3. Shell Programming and Scripting

Extract info from log file and compute using time date stamp

Looking for a shell script or a simple perl script . I am new to scripting and not very good at it . I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report. ... (0 Replies)
Discussion started by: breez_drew
0 Replies

4. Shell Programming and Scripting

Log File - Getting Info about preceding Date of Pattern Found

Ok Suppose I have a log file like the below: 2010-07-15 00:00:01,410 DEBUG 2010-07-15 00:01:01,410 DEBUG 2010-07-15 00:01:02,410 DEBUG com.af ajfajfaf affafadfadfd dfa fdfadfdfadfadf fafafdfadfdafadfdaffdaffadf afdfdafdfdafafd error error failure afdfadfdfdfdf EBUDGG eafaferror failure... (6 Replies)
Discussion started by: SkySmart
6 Replies

5. Shell Programming and Scripting

Help finding info from log file

Hi, I have a log file that contains information such as this: date id number command1 command2 command3 command4 data data data date id number command1 command2 command3 command4 (4 Replies)
Discussion started by: bbbngowc
4 Replies

6. Shell Programming and Scripting

Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB).

Hi Experts, I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Discussion started by: manishkomar007
7 Replies

7. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

8. Shell Programming and Scripting

HELP: Shell Script to read a Log file line by line and extract Info based on KEYWORDS matching

I have a LOG file which looks like this Import started at: Mon Jul 23 02:13:01 EDT 2012 Initialization completed in 2.146 seconds. -------------------------------------------------------------------------------- -- Import summary for Import item: PolicyInformation... (8 Replies)
Discussion started by: biztank
8 Replies

9. Shell Programming and Scripting

How to select bulk of info from log file?

unix : sun shell : bash i need to select multiple rows with this format : <special format> 10 lines /<special format> from log file that have lots of info i thought of getting the number of the first line using grep -n "special format" file | cut -d: -f1 then pass it to shell... (2 Replies)
Discussion started by: scorpioneer
2 Replies

10. Shell Programming and Scripting

Help on script to capture info on log file for a particular time frame

Hi I have a system running uname -a Linux cmovel-db01 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux I would like to capture the contents of /var/log/syslog from 11:00AM to 11:30AM and sent to this info via email. I was thinking in set a cron entry at that... (2 Replies)
Discussion started by: fretagi
2 Replies
dladdr(3C)																dladdr(3C)

NAME
dladdr() - get the symbolic information for an address SYNOPSIS
[flag]... cfile ... [library]... Multithread Usage This routine is thread-safe. DESCRIPTION
is one of a family of routines that give the user direct access to the dynamic linking facilities (using the option on the compiler or com- mand line). allows a process to obtain information about the symbol that most closely defines a given address. determines whether the specified address is located within one of the load modules (executable or shared libraries) that make up the process' address space. An address is deemed to fall within a load module when it is between the base address at which the load module was mapped and the highest vir- tual address mapped for that load module, inclusive. If a load module fits this criteria, its dynamic symbol table is searched to locate the nearest symbol to the specified address. The nearest symbol is the one whose value is equal to, or closest to but less than the speci- fied address. dlip is a pointer to a structure. The structure must be allocated by the user. The structure members are set by if the specified address falls within one of the load modules. The structure contains the following members: The fields of the structure contain the following: dli_fname Pointer to the filename of the load module containing the address. The contents of this memory location can change between calls to dli_fbase Handle to the load module. This can be used as the first argument to dli_sname Pointer to the name of the nearest symbol to the specified address. This symbol either has the same address, or is the nearest symbol with a lower address. The contents of this memory location can change between calls to dli_saddr Actual address of the nearest symbol. For code symbols, it contains the address of the OPD (Official Plabel Descrip- tor) for the nearest code symbol. dli_size (ELF process only) Size of the nearest symbol as defined in the dynamic symbol table. dli_bind (ELF process only) Binding attribute of the nearest symbol as defined in the dynamic symbol table. The values for this are those used for a symbol's binding in the ELF symbol table (see dli_type Type of the nearest symbol. For ELF process, this is the same as the value for type in the dynamic symbol table. The values for this are those used for a symbol's type in the ELF symbol table (see For SOM process, this can have the value or as defined in RETURN VALUE
If the specified address does not fall within one of the load modules, is returned; the contents of the structure are not modified. Other- wise, a non-zero value is returned and the fields of the structure are set. DIAGNOSTICS
If no symbol is found within the load module containing address whose value is less than or equal to address, the dli_sname, dli_saddr, and dli_size fields are set to the dli_bind field is set to and the dli_type field is set to For only a subset of externally visible symbols are typically exported: specifically those referenced by the load modules with which the is linked. The exact set of exported symbols for any shared library or the can be controlled using the linker (see ld(1)). ERRORS
If fails, a subsequent call to returns one of the following values: Invalid symbol address in load module. Cannot apply relocation in library. Address not found in any load module. Out of memory. failed on entry to or exit from failed on exit from failed on entry to SEE ALSO
cc(1), ld(1), sh(1), exec(2), dlclose(3C), dlerrno(3C), dlerror(3C), dlsym(3C). Texts and Tutorials (See the option) (See manuals(5) for ordering information) dladdr(3C)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy