Sponsored Content
Top Forums Shell Programming and Scripting Grab data within a table in a long log file. Post 302765071 by piynik on Friday 1st of February 2013 12:24:01 PM
Old 02-01-2013
Grab data within a table in a long log file.

in my file which is a rather long log file it contains many text and tables and there is one table with 15 columns and I am interested to read in the value in column6 and its corresponding value in column2. Trouble is I do not know how to script it as the line number various between different log file and column 1 is different in all the lines within that table so there is nothing to match. Can anyone tell me how I could write this script?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search and grab data from a huge file

folks, In my working directory, there a multiple large files which only contain one line in the file. The line is too long to use "grep", so any help? For example, if I want to find if these files contain a string like "93849", what command I should use? Also, there is oder_id number... (1 Reply)
Discussion started by: ting123
1 Replies

2. Shell Programming and Scripting

How to grab data between 2 strings ?

Hi All, I have a text file below. How do i grab all the data between "05T00NPQSMR1" and "****" using awk ? Pls note that the text lines may not be fixed and text content is dynamic. Pls help. Thanks Below is my code where $LOT_SUFFIX is my shell variable. awk '/'"$LOT_SUFFIX"'/,/blah/'... (16 Replies)
Discussion started by: Raynon
16 Replies

3. Shell Programming and Scripting

Load data to flat file from table.

Hi all, I need to know how to copy data from a table say ABC to a flat file say XYZ.dat in unix, Please leave ur comments and the fastest way to do so, I need to load the table records into flat file. Regards Ann (4 Replies)
Discussion started by: Haque123
4 Replies

4. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

5. Shell Programming and Scripting

How to export table data to xml file?

Hi , I would like to get some suggestion from the experts. My requirement is to export oracle table data as an xml file. Any unix/linux tools, scripts available? Regards, (2 Replies)
Discussion started by: LinuxLearner
2 Replies

6. Shell Programming and Scripting

Grab the data

Hello Honourable Members, I stuck into one issue, my server is migrating from UNIX to linux and ptree command does not work there. I was working with pstree command in linux and need some help regarding the same. suppose i have one line for example: ram (121)--- sita... (3 Replies)
Discussion started by: singhabm
3 Replies

7. Shell Programming and Scripting

Grab data between 2 keywords any do an array operation and write the file intact

Hi Unix Gurus, I need to grep for a block that is between a start and end keyword and then in between I need to find and replace a keyword. for eg: I need to search between Test = 000; and Test = 000; and find K9 and replace with M9 INPUT FILE Define { Replace = K9; Test =... (6 Replies)
Discussion started by: naveen@
6 Replies

8. Shell Programming and Scripting

Grab 2 pieces of data within a file

I am a newbie and what I have is a captured file of content. I want to be able to grab 2 pieces of data, multiple times and print them to the screen. DataFile owner: locke user: fun data size: 60 location: Anaheim owner: david user: work data size: 80 location: Orange my script... (2 Replies)
Discussion started by: greglocke
2 Replies

9. Shell Programming and Scripting

How to grab a block of data in a file with repeating pattern?

I need to send email to receipient in each block of data in a file which has the sender address under TO and just send that block of data where it ends as COMPANY. I tried to work this out by getting line numbers of the string HELLO but unable to grab the next block of data to send the next... (5 Replies)
Discussion started by: loggedout
5 Replies

10. Shell Programming and Scripting

Creating html table from data in file

Hi. I need to create html table from file which contains data. No awk please :) In example, ->cat file num1 num2 num3 23 3 5 2 3 4 (between numbers and words single TAB). after running mycode i need to get (heading is the first line): <table>... (2 Replies)
Discussion started by: Manu1234567
2 Replies
stio(3) 						     Library Functions Manual							   stio(3)

Name
       st_readbinary, st_readst, st_writebinary, st_writest - routines that provide a binary read/write interface to the MIPS symbol table

Syntax
       #include <syms.h>

       long st_readbinary (filename, how)
       char *filename;
       char how;

       long st_readst (fn, how, filebase, pchdr, flags)
       long fn;
       char how;
       long filebase;
       pCHDRR pchdr;
       long flags;

       void st_writebinary (filename, flags)
       char *filename;
       long flags;

       void st_writest (fn, flags)
       long fn;
       long flags;

Description
       The  CHDRR  structure  (see cmplrs/stsupport.h and the represents a symbol table in memory.  A new CHDRR can be created by reading a symbol
       table in from disk. The st_readbinary and st_readst routines read a symbol table in from disk.

       The routine st_readbinary takes the file name of the symbol table and assumes the symbol table header (HDRR in sym.h occurs at  the  begin-
       ning  of  the file. The st_readst assumes that its file number references a file positioned at the beginning of the symbol table header and
       that the filebase parameter specifies where the object or symbol table file is based (for example, non-zero for archives).

       The second parameter to the read routines can be r for read only or a for appending to the symbol table. Existing local symbol, line,  pro-
       cedure,	auxiliary,  optimization,  and	local  string  tables  cannot be appended. If they didn't exist on disk, they can be created. This
       restriction stems from the allocation algorithm for those symbol table sections when read in from disk and follows the standard pattern for
       building the symbol table.

       The  symbol  table can be read incrementally.  If pchdr is zero, st_readst assumes that a symbol table has not been read yet; therefore, it
       reads in the symbol table header and file descriptors.  The flags argument is a bit mask that defines what other  tables  should  be  read.
       The  t_p*  constants  for  each table, defined in stsupport.h, can be ORed.  If flags equals -1, all tables are read.  If pchdr is set, the
       tables specified by flags are added to the tables that have already been read.  The pchdr's value can be taken from st_current_pchdr. See

       Line number entries are encoded on disk; the read routines expand them to longs.

       If the version stamp is out of date, a warning message is issued to stderr.  If the magic number in the	HDRR  is  incorrect,  st_error	is
       called. All other errors cause the read routines to read non-zero; otherwise, a zero is returned.

       The  routines st_writebinary and st_writest are symmetric to the read routines, excluding the how and pchdr parameters. The flags parameter
       is a bit mask that defines what table should be written.  The st_p* constants for each table, defined in stsupport.h, can be ORed. If flags
       equals -1, all tables are written.

       The write routines write sections of the table in the approved order, as specified in the link editor specification.

       Line numbers are compressed on disk.

       The write routines start all sections of the symbol table on four-byte boundaries.

       If the write routines encounter an error, st_error is called. After writing the symbol table, further access to the table by other routines
       is undefined.

See Also
       stcu(3), stfe(3), stfd(3), sym.h(5), sterror(5) stsupport.h(5)

								       RISC								   stio(3)
All times are GMT -4. The time now is 02:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy