Search Results

Search: Posts Made By: stuggler
1,224
Posted By radoulov
Another one: awk 'NR == FNR { _[$1]++; next...
Another one:

awk 'NR == FNR { _[$1]++; next }
$1 in _ {
printf "for %s in file %s, \nthe count is %d\n", \
$1, FILENAME, _[$1]
}' file1 file2
1,224
Posted By |UVI|
#!/bin/bash DATA1=file1.txt ...
#!/bin/bash

DATA1=file1.txt
DATA2=file2.txt

awk 'BEGIN {
while ((getline < "'$DATA2'") > 0)
f2array[$1] = "foo";
}

{
results[$1]+=0
results[$2]+=0
results[$3]+=0
if ( $1 in...
Forum: Programming 03-30-2011
1,840
Posted By cgkmal
Hi stuggler, I'm not sure if you need...
Hi stuggler,

I'm not sure if you need something as follow, if so try with:
Sample: (There are some interlaced sequences)
cat inputfile
0, 0, 0, 56, 11
1, 524, 3, 6, 74
1, 624, 0, 43, 33
2,...
Showing results 1 to 3 of 3

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