Sponsored Content
Top Forums Shell Programming and Scripting Complex text parsing with speed/performance problem (awk solution?) Post 302781087 by RudiC on Friday 15th of March 2013 01:53:07 PM
Old 03-15-2013
As much as I would like to help, you lost me. I can't possibly imagine what you want to achieve, coming from where.
Pls post directory structure (as you want that looong path included), algorithms to calculate the varns, an input file sample, and from that concoction the desired output.


EDIT: This may fulfill part of your requirements:
Code:
$ awk 'NR > 10 {printf "%s,", $2} NR == 34 {printf "%s", FILENAME; exit}' /some/path/file

EDIT 2: put sub (/[^\/]*$/, ",&",FILENAME); in front of the print FILENAME.

Last edited by RudiC; 03-15-2013 at 03:08 PM..
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk parsing problem

I need help with a problem that I have not been able to figure out. I have a file that is about 650K lines. Records are seperated by blank lines, fields seperated by new lines. I was trying to make a report that would add up 2 fields and associate them with a CP. example output would be... (11 Replies)
Discussion started by: timj123
11 Replies

2. Shell Programming and Scripting

Parsing a complex log file

I have a log file that has many SQL statements/queries/blocks and their resultant output (success or failure) added to each of them. I need to pick up all the statements which caused errors and write them to a separate file. On most cases, the SQL statement is a single line, like DROP . And if... (1 Reply)
Discussion started by: exchequer598
1 Replies

3. Shell Programming and Scripting

Difficult problem: Complex text file manipulation in bash script.

I don't know if this is a big issue or not, but I'm having difficulties. I apoligize for the upcoming essay :o. I'm writing a script, similar to a paint program that edits images, but in the form of ANSI block characters. The program so far is working. I managed to save the image into a file,... (14 Replies)
Discussion started by: tinman47
14 Replies

4. Shell Programming and Scripting

Complex awk problem

hello, i have a complex awk problem... i have two tables, one with a value (0 to 1) and it's corresponding p-value, like this: 1. table: ______________________________ value p-value ... ... 0.254 0.003 0.245 0.005 0.233 0.006 ... ... ______________________________ and a... (6 Replies)
Discussion started by: dietmar13
6 Replies

5. Shell Programming and Scripting

Text string parsing in awk

I have a awk script that parses many millions of lines so performance is critical. At one point I am extracting some variables from a space delimited string. alarm = $11; len = split(alarm,a," "); ent = a; chem = a; for (i = 5; i<= len; i++) {chem = chem " " a}It works but is slow. Adding the... (7 Replies)
Discussion started by: Michael Stora
7 Replies

6. Shell Programming and Scripting

awk parsing problem

Hello fellow unix geeks, I am having a small dilemna trying to parse a log file I have. Below is a sample of what it will look like: MY_TOKEN1(group) TOKEN(other)|SSID1 MY_TOKEN2(group, group2)|SSID2 What I need to do is only keep the MY_TOKEN pieces and where there are multiple... (7 Replies)
Discussion started by: dagamier
7 Replies
AXPORTS(5)						     Linux Programmer's Manual							AXPORTS(5)

NAME
/etc/ax25/axports - AX.25 port configuration file. DESCRIPTION
axports is an ASCII file that contains information about each of the physical AX.25 ports that are to be used. When dealing with an AX.25 utility such as call, it takes an argument that is the port name. This port name is a reference to the line within axports, which has that name as its first argument. The information on each line contains enough information to bind the command to a particular physical AX.25 interface, this binding is done by matching the callsign on the line in axports with the callsign of the port set by kissattach. The lines within axports must either be a comment line, which starts with a # in the first column, or a port description in the following format, each field being delimited by white space: name callsign speed paclen window description The field descriptions are: name is the unique identifier of the port. This is the name given as the port argument of many of the AX.25 support pro- grams. This is not in any way related to actual device identities, just unique callsign the callsign of the physical interface to bind to. speed this is the speed of interface, a value of zero means that no speed will be set by kissattach(8). paclen is the default maximum packet size for this interface. window the default window size for this interface. description a free format description of this interface, this field extends to the end of the line. This field may contain spaces. FILES
/etc/ax25/axports SEE ALSO
call(1), ax25(4), axparms(8), kissattach(8). Linux 2008-Feb-04 AXPORTS(5)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy