Search Results

Search: Posts Made By: PG3
6,451
Posted By balajesuri
#!/usr/bin/perl -w use strict; use...
#!/usr/bin/perl -w
use strict;
use Time::Local;
use POSIX;

my @st_date = split/-/, $ARGV[0];
my @nd_date = split/-/, $ARGV[1];

my $st_dt = timelocal (0, 0, 0, $st_date[2], $st_date[1] -...
2,159
Posted By Scrutinizer
Hi try this: awk '/AUTH/{A[$NF]++}...
Hi try this:
awk '/AUTH/{A[$NF]++} /PRES/{P[$NF]++} /SETT/&& A[$NF] && P[$NF]{print $1}' infileor
awk '/AUTH/{A[$NF]++} /PRES/{P[$NF]++} /SETT/&& A[$NF] && P[$NF]{print $1; delete A[$NF]; delete...
2,159
Posted By Scrutinizer
Alternatively (assuming ID's are unique so...
Alternatively (assuming ID's are unique so accountnumbers are unique too):
awk '/AUTH/{A[$NF]=$0}/FINAL/&&A[$NF]{print $0 RS A[$NF]}' infileor more memory efficient:
awk...
2,159
Posted By ctsgnb
nawk '{A[$1":"$NF]+=1;B[$0]=$1":"$NF}END{for(i in...
nawk '{A[$1":"$NF]+=1;B[$0]=$1":"$NF}END{for(i in B) if (A[B[i]]>1) print i}' myfile
1,706
Posted By Peasant
Are you sure you have expr on that machine ? ...
Are you sure you have expr on that machine ?

Can you try this inside loop to increment

A=$(( $A + 1 ))

Also, put #!/bin/ksh -x and observe the output when you run the script.

Regards...
1,183
Posted By jim mcnamara
What output do you want - exactly. This...
What output do you want - exactly.

This "identifies" the scenario your defined

awk '{arr[$1 $2]++; next}
END{for (i in arr)
{
if(arr[i]>1)
{print i, "other...
25,794
Posted By Ygor
SQL Loader has better performance for large...
SQL Loader has better performance for large loads, but you can also just use a quick awk script to process the CSV file, e.g...$ cat file1.csv
395 , LIES CANT BE FOUND IN TRUTH, 20110517 , PRD1
231...
2,207
Posted By Corona688
That is a useless use of cat...
That is a useless use of cat (http://partmaps.org/era/unix/award.html). Whenever you do cat foo | program you can also do program < foo to save your program a lot of wasted CPU time.

For programs...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 07:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy