I am trying to print the output of a command to two separate files. Is it possible to use awk to print $1 to one file and $2 to another file?
Thanks in advance! (1 Reply)
Hello!
I am writing a program to run through two large lists of data (~300,000 rows), find where rows in one file match another, and combine them based on matching fields. Due to the large file sizes, I'm guessing AWK will be the most efficient way to do this. Overall, the input and output I'm... (5 Replies)
Hi unix gurus,
I have a urgent requirement, I need to write a AWK script to compare each fields in 2 files using AWK.
Basically my output should be like this.
file1
row|num1|num2|num3
1|one|two|three
2|one|two|three
file2
row|num1|num2|num3
1|one|two|three
2|one|two|four
... (5 Replies)
Hi All,
Looking for a quick AWK script to output some differences between two files.
FILE1
device1 1.1.1.1 PINGS
device1 2.2.2.2 PINGS
FILE2
2862 SITE1 device1-prod 1.1.1.1 icmp - 0 ... (4 Replies)
Hi,
I have two files formatted as following:
File 1: (user_num_ID , realID) (the NR here is 41671)
1 cust_034_60
2 cust_80_91
3 cust_406_4
..
..
File 2: (realID , clusterNumber) (total NR here is 1000)
cust_034_60 2
cust_406_4 3
..
.. (11 Replies)
Hello Friends,
I just need a small help, I need an awk program which can join 2 fields of different files which are having one common field into one file.
File - 1
FileName~Size
File- 2
FileName~Date
I need the output file in the following way
O/P- File
FileName~Date~Size
For... (4 Replies)
I'm trying to sum each field of the second column over many different files.
For example:
file1: file2:
1 5 1 5
2 6 2 4
3 5 3 3
To get:
file3
1 10
2 10
3 8
I found answer when there are only 2 files as... (10 Replies)
Hi,
I have 2 tab-delimited input files as follows.
file1.tab:
green A apple
red B apple
file2.tab:
apple - A;Z
Objective:
Return $1 of file1 if,
. $1 of file2 matches $3 of file1 and,
. any single element (separated by ";") in $3 of file2 is present in $2 of file1
In order to... (3 Replies)
Hi, I have two TEST files t.xyz and a.xyz which have three columns each. a.xyz have more rows than t.xyz. I will like to output rows at which $1 and $2 of t.xyz match $1 and $2 of a.xyz. Total number of output rows should be equal to that of t.xyz.
It works fine, but when I apply it to large... (6 Replies)
Discussion started by: geomarine
6 Replies
LEARN ABOUT DEBIAN
ns_adprequest
Ns_Adp(3aolserver) AOLserver Library Procedures Ns_Adp(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
Ns_AdpRegisterParser, Ns_AdpRequest - Create and use ADP parsers
SYNOPSIS
#include "ns.h"
int
Ns_AdpRegisterParser(char *extension, Ns_AdpParserProc *newParserProc)
int
Ns_AdpRequest(arg, arg)
_________________________________________________________________DESCRIPTION
These functions register new ADP parsers and run ADP requests.
Ns_AdpRegisterParser(extension, newParserProc)
Registers a new, named ADP parser procedure with the name given in extension. You can tie a file extension to a particular named
parser in the nsd.tcl file. The newParserProc will be called when an ADP with the associated file extension needs to be parsed. If a
file extension is registered as an ADP in the nsd.tcl but no parser is associated with that file extension, the default ADP parser
is used.
The newParserProc must accept two arguments:
typedef void (Ns_AdpParserProc)(Ns_DString *out, char *in);
The ADP input is pointed to by in. Your parser must process the content of in and append the parsed output to out.
The output should be formatted as a series of concatenated "chunks". A chunk is a string of the format:
<type character><string><null>
where <type character> = 't' or 's'. A 't' means what follows is HTML and should be returned directly to the browser. An 's' means
what follows is Tcl and should be evaluated.
After the last chunk there should be an extra <null> character. For example, the "adp" parser will take a page like this:
This is a test page<%ns_puts hi%>The end<%ns_puts bye%>
And create this output:
"tThis is a test page sns_puts hi tThe end sns_puts bye "
Ns_AdpRequest(conn, file)
Parse and evaluate an ADP file.
SEE ALSO nsd(1), info(n)
KEYWORDS AOLserver 4.0 Ns_Adp(3aolserver)