Sponsored Content
Full Discussion: Gawk output difference
Top Forums Shell Programming and Scripting Gawk output difference Post 302785661 by Franklin52 on Tuesday 26th of March 2013 06:16:23 AM
Old 03-26-2013
In the second command the FS is set after reading the first record.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to output the difference of two files?

Hi, I had two data file (File1, File2), each one just have one column, but two file were very big. File2 is smaller, all its data included in File1. I want to ouput the result which don't have any data in File2. Could any one give me a help on how to do that? Thanks in advance! Yun ... (4 Replies)
Discussion started by: yxiao
4 Replies

2. Shell Programming and Scripting

How to find date Difference in AWK/GAWK with millisecond precision

Hi, I have a log file that has the date in this format "2006-05-30_13:14:04,256". I need to find the time difference between two log entries in milliseconds. How to achieve this in AWK/GAWK script? :confused: (2 Replies)
Discussion started by: omprasad
2 Replies

3. HP-UX

Difference in netstat -a and -an output.

Hi, Does anyone know why I get a different output when using "netstat -a" or "netstat -an" ?? # netstat -a | grep ts15r135 tcp 0 0 nbsol152.62736 ts15r135.23211 ESTABLISHED # netstat -an | grep 172.23.160.78 tcp 0 0 135.246.39.152.51954 ... (4 Replies)
Discussion started by: ejdv
4 Replies

4. UNIX for Advanced & Expert Users

GAWK removes FS | on output

I have the simple gawk script below. When the script runs in the output of all the ITM lines the FS is replaced with a space, the Non ITM lines retain the | field separator. The ITM lines have many fields and I can't insert "|" between each field because some of the fields are blank. Is... (1 Reply)
Discussion started by: paulr211
1 Replies

5. Solaris

Difference in date output

HiCan anyone tell me why I am getting a difference in the date format on 2 different Solaris servers?On one I get: -Monday, 9 November 2009 09:02:45 GMTand the other: -Monday November 9 09:03:05 GMT 2009Both servers are running OS Version M-11/16/88iCan anyone tell me why one uses a "," and the... (5 Replies)
Discussion started by: steadyonabix
5 Replies

6. Shell Programming and Scripting

Trying to learn to use functions in gawk and not getting expected output.

I've been working on improving my awk, and the next thing I want to learn is to properly use functions (I understand functions in shell and python). I have the following code which includes how I did this without functions before, and two attempts I've made to do it with functions: function... (3 Replies)
Discussion started by: DeCoTwc
3 Replies

7. Shell Programming and Scripting

Difference output of files

Need help on below req Compare two files and send difference of file to other file File2 is static which never changes ex: File1 A.txt B.ttx C.txt E.txt File2 A.txt (6 Replies)
Discussion started by: satish1222
6 Replies

8. Shell Programming and Scripting

Gawk output separated by tab

In the gawk below, I am trying to output the file tab-deliminated but don't think that is the correct syntax. Thank you :). gawk OFS='/t' '{sub(/-+/,"",$2); ar=$0} END{n = asort(ar) for (i = 1; i <= n; i++) print ar}' file (2 Replies)
Discussion started by: cmccabe
2 Replies

9. Shell Programming and Scripting

Difference in awk output and while

so, im going over one of my scripts and trying to optimize it. i have a code like this: cksum sjreas.py | awk '{prinnt $1$2}' This does what I need. However, i dont want to call the external command awk. so im doing this: cksum sjreas.py | while OFS=' ' read v1 v2 ; do printf... (4 Replies)
Discussion started by: SkySmart
4 Replies

10. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
DlfStream(3pm)						  LogReport's Lire Documentation					    DlfStream(3pm)

NAME
Lire::DlfStream - Interface to DLF data stream SYNOPSIS
use Lire::DlfStore; my $store = Lire::DlfStore->open( "mystore" ); my $dlf_stream = $store->open_dlf_stream( "www", "r" ); print "Data begins on ", scalar localtime $dlf_stream->start_time(), " "; print "Data ends on ", scalar localtime $dlf_stream->end_time(), " "; while ( my $dlf = $dlf_stream->read_dlf() ) { ... } DESCRIPTION
This object encapsulates DLF stream. name Returns the schema's name of the DlfStream. mode() Returns the mode in which the DlfStream was opened. sort_spec() Returns the sort specification that is set on the stream. close() This method should be called when the Lire::DlfStream isn't needed anymore, otherwise the same DlfStream cannot be opened until then. nrecords() Returs the number of DLF records in the stream. start_time() Returns the timestamp of the oldest DLF record in the stream in seconds since the epoch. end_time() Returns the timestamp of the newest DLF record in the stream in seconds since the epoch. read_dlf() Returns an hash reference containing the next DLF record in the stream. It returns undef once the end of the stream is reached. This method will throw an exception if the DlfStream isn't open in 'r' mode or if there is an error reading the DLF record. read_dlf_aref() Returns the next DLF record in the stream as an array reference. The fields are in the order specified by the schema. This method will throw an exception if the DlfStream isn't open in 'r' mode or if there is an error reading the DLF record. write_dlf( $dlf, [ $link_ids ] ) Writes the fields contained in the hash ref $dlf to the DLF stream. This method will throw an exception if there is an error writing the DLF record or if the stream isn't opened in 'w' mode. The $link_ids parameter is used when the stream's schema is a Lire::DerivedSchema. It should be an array reference containing the DLF ids of the records which are linked to this record. clean( [ $time ] ) This method will remove all DLF records older than $time. It $time is omitted, all Dlf records will be removed. Lire 2.1.1 2006-07-23 DlfStream(3pm)
All times are GMT -4. The time now is 05:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy