Search Results

Search: Posts Made By: gpsridhar
5,025
Posted By vgersh99
something along these lines. # default 2 keys ...
something along these lines.
# default 2 keys
nawk -f gp.awk file1 file2
#
# with 3 keys
nawk -v keys=3 -f gp.awk file1 file2

gp.awk:

BEGIN {
FS=OFS=","
if (!keys) keys=2
}
{...
5,025
Posted By vgersh99
nawk -f gp.awk file1 file2 gp.awk: ...
nawk -f gp.awk file1 file2

gp.awk:

BEGIN {
FS=OFS=","
}
{ idx = $1 OFS $2 }
FNR==NR { f1[idx]=$0;next}
idx in f1 {
n=split(f1[idx],a,FS)
for(i=3;i<=NF;i++)
print idx,a[i], $i,...
5,946
Posted By felipe.vinturin
Here is a simple way: open FIRFILE...
Here is a simple way:


open FIRFILE "file1.txt" or die "Unable to open file: [$!]";
open SECFILE "file2.txt" or die "Unable to open file: [$!]";

# Start with empty hashes
my %firHash = ();...
5,946
Posted By felipe.vinturin
About reading a configuration file, you can check...
About reading a configuration file, you can check this link: How to read a configuration file with Perl | devdaily.com (http://www.devdaily.com/blog/post/perl/how-read-configuration-data-file-perl)
...
Showing results 1 to 4 of 4

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