10-07-2011
thanks!! yes I was missing -a option which is what I needed!! thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
nawk 'NR==FNR{a;next} {if($1 in a) print $1,"Found" else print}' OFS="," File_B File_A
The above code is not working help is appreciated (6 Replies)
Discussion started by: pinnacle
6 Replies
2. Shell Programming and Scripting
I'm new of UNIX shell scripting. I'm recently generating a excel report in UNIX(file with delimiter is fine). How should I make a script to do it?
1 file to join comes from output of one UNIX command, the second from another UNIX command, and third from a database query. The key columes of all... (7 Replies)
Discussion started by: bigsmile
7 Replies
3. UNIX for Advanced & Expert Users
hi, i have
file 1:
======
0501000|X1
0502000|X2
0501231|X3
0981222|X4
0502000|X6
0503000|X7
0932322|X8
file 2:
=======
050
0501
0502
09
098 (1 Reply)
Discussion started by: magedfawzy
1 Replies
4. Shell Programming and Scripting
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies
5. Programming
I have a data table as follows:
mysql> select * from validations where source = "a03";
+------------+-------+--------+
| date | price | source |
+------------+-------+--------+
| 2001-01-03 | 80 | a03 |
| 2001-01-04 | 82 | a03 |
| 2001-01-05 | 84 | a03 |
| 2001-01-06... (2 Replies)
Discussion started by: figaro
2 Replies
6. Shell Programming and Scripting
Hi guys,
I need to use awk to join 2 files
file_1
A 001
B 002
C 003
file_2
A XX1
B XX2
output desired
A 001 XX1
B 002 missing
C 003 XX2
thank you! (2 Replies)
Discussion started by: g1org1o
2 Replies
7. Shell Programming and Scripting
Hi guys,
I need AWK to merge the following 2 files:
file1
1 a 1 1
2 b 2 2
3 c 3 3
4 d 4 4
file2
a a/a c/c a/c c/c a/a c/t
c c/t c/c a/t g/g c/c c/t
desired output:
1 a 1 1 a/a c/c a/c c/c a/a c/t
2 b 2 2 x x x x x x
3 c 3 3 c/t c/c a/t g/g c/c c/t
4 d 4 4 x x x x x x (2 Replies)
Discussion started by: g1org1o
2 Replies
8. Shell Programming and Scripting
Hi,
I have a file pk.txt which has pk data in following format
TableName | PK
Employee | id
Contact|name,country
My Output should be
Employee | t1.id=s.id
Contact| t1.name=s.name AND t1.country=s.country
I started of like this:
for LIST in `cat pk.txt` do... (5 Replies)
Discussion started by: wahi80
5 Replies
9. Shell Programming and Scripting
Hello,
I have 2 csv as follows:
a.csv:
name,phone,adress,car
xy,1234,asbd
yz,2134,asbdf
tc,6789,salkdur
b.csv:
telphone,vehicle
2134,toyota
6789,bmw
1234,honda
What is need is this:
output.csv:
name,phone,adres,car
xy,1234,asbd,honda
yz,2134,asbdf,toyota (7 Replies)
Discussion started by: Zam_1234
7 Replies
10. Shell Programming and Scripting
Hello,
This post is already here but want to do this with another way
Merge multiples files with multiples duplicates keys by filling "NULL" the void columns for anothers joinning files
file1.csv:
1|abc
1|def
2|ghi
2|jkl
3|mno
3|pqr
file2.csv:
1|123|jojo
1|NULL|bibi... (2 Replies)
Discussion started by: yjacknewton
2 Replies
LEARN ABOUT DEBIAN
cdkparamstring
cdk_params(3) Library Functions Manual cdk_params(3)
NAME
cdk_params - Cdk command-line parsing
SYNOPSIS
cc [ flag ... ] file ... -lcdk [ library ... ]
#include <cdk.h>
int CDKparamNumber (
CDK_PARAMS *params,
int option);
int CDKparamNumber2 (
CDK_PARAMS *params,
int option,
int missing);
char * CDKparamString (
CDK_PARAMS *params,
int option);
char * CDKparamString2 (
CDK_PARAMS *params,
int option,
char *missing);
void CDKparseParams (
int argc,
char **argv,
CDK_PARAMS *params,
char *options);
int CDKparsePosition (
char *string);
int CDKparamValue (
CDK_PARAMS * params,
int option,
int missing);
DESCRIPTION
These are a set of functions used to implement the command-line utilities and demonstration programs for Cdk. Rather than set the pro-
grams' options at initialization, they construct a simple database which holds the common parameters using CDKparseParams().
AVAILABLE FUNCTIONS
CDKparamNumber
Retrieves an integer (or boolean) option value from the parsed command-line.
CDKparamNumber2
Retrieves an optional integer (or boolean) value from the parsed command-line. If the command line option is not present, the missing
value is used.
CDKparamString
Retrieves a string option value from the parsed command-line.
CDKparamString2
Retrieve an optional string option value from the parsed command-line.
CDKparamValue
Retrieve an integer (or boolean) option value from the parsed command-line.
CDKparseParams
Parse the given argc/argv command-line, with the options passed to getopt()'s 3rd parameter.
CDKparsePosition
Parse the string as one of CDK's positioning keywords, or an actual position.
SEE ALSO
cdk_position (3), getopt (3)
cdk_params(3)