Search Results

Search: Posts Made By: vasanth.vadalur
1,030
Posted By agama
I think this does what you are looking for: ...
I think this does what you are looking for:


awk '
{
if( NR > 1 )
{
split( $0, b, " " );
if( b[1] == a[3] && b[2] == a[4] && a[2] == b[4] )
...
853
Posted By m.d.ludwig
Here you go: $, = ' '; $\ = "\n"; $_ =...
Here you go:
$, = ' ';
$\ = "\n";

$_ = <>;
my @R = split;

while (<>) {
my @N = split;
if ($P[2] == $R[0] && $P[3] == $R[1]) { @N[0..1] = @R[0..1]; }
@R = @N;
}

print @R;
1,042
Posted By ygemici
I update vasanth's solution # awk -F':'...
I update vasanth's solution
# awk -F':' '/^details/{split($0, a, "=")}; /^class/{b=$2} /^adress/{print a[1]"="b" ="$2}' file1
details of them = 5th_needed = address_needed
875
Posted By cgkmal
Hi vasanth.v, You can try with: awk...
Hi vasanth.v,

You can try with:
awk 'BEGIN{print "COl1|TIME|DATE|Config|FileName|FileSize|par"}
{sub(/ \(/,"(")}
/^Start line/{a=$3"|"$4"|"$5" "$6}
/^config/{a=a"|"$2"--"}
/File Name|File...
3,977
Posted By pravin27
Try this, awk -F";"...
Try this,
awk -F";" 'NR==FNR{a[$2]=$1FS$3;next} a[$3]{print $0 FS a[$3]}' file2 file1 > outputfile
3,977
Posted By danmero
awk -F";" 'NR==FNR{a[$2]=$1 OFS $3;next}...
awk -F";" 'NR==FNR{a[$2]=$1 OFS $3;next} a[$3]{print $0,a[$3]}' OFS=\; file2 file1
Showing results 1 to 6 of 6

 

Featured Tech Videos

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