Search Results

Search: Posts Made By: mvalonso
3,019
Posted By Scrutinizer
Try: awk '/Sent/{S[$4]=$8} /rename/{F[$4]=$NF}...
Try:
awk '/Sent/{S[$4]=$8} /rename/{F[$4]=$NF} /End of job/{print $NF, S[$4], F[$4]}' OFS=\; file

JOB1;SERVER1;/users/file1.dat.001
3,019
Posted By RudiC
Try awk '/BEGIN JOB/, /End of job/ {if (/BEGIN...
Try
awk '/BEGIN JOB/, /End of job/ {if (/BEGIN JOB/ || /file/) print $NF; if (/Sent/) print $(NF-2)}' file
JOB1
/users/file1.dat.001
SERVER1
1,558
Posted By RudiC
Slightly different approach:awk '{getline X < f;...
Slightly different approach:awk '{getline X < f; split (X,Y); for (i=2; i<=NF;i++) if ($i != Y[i]) print "Col", i-1, "is \"" $i "\" in", FILENAME, "and \"" Y[i] "\" in", f, "for", $1 }' FS=";"...
1,558
Posted By Scrutinizer
Try: paste -d\; file1 file2 | awk -F\;...
Try:
paste -d\; file1 file2 |
awk -F\; '{for(i=2; i<=NF/2; i++) if($i!=$(i+NF/2)) printf "Column %s is \"%s\" in File1 and \"%s\" in File2 for %s\n", i-1, $i, $(i+NF/2), $1}'

Output:
Column 3...
4,137
Posted By Yoda
As I said earlier in my post, the code was based...
As I said earlier in my post, the code was based on some assumptions.

This is what I get with modified awk code:
awk '
{
for ( i = 1; i <= NF; i++ )
{...
791
Posted By chihung
awk ' /select/,/;/ {i select=sprintf("%s...
awk '
/select/,/;/ {i
select=sprintf("%s %s",select,$0)
print
}
select~/select.*;/ {
printf("\n")
select=""
}'
3,078
Posted By bartus11
You can start with: awk -F"(" '{a[$1]=1}END{for...
You can start with: awk -F"(" '{a[$1]=1}END{for (i in a) print i}' file
Showing results 1 to 7 of 7

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