Search Results

Search: Posts Made By: radoulov
5,761
Posted By radoulov
You may try this quick and dirty solution (you...
You may try this quick and dirty solution (you should use bash or /usr/dt/bin/dtksh for this script):

#! /bin/bash

nawk 'BEGIN {
FS = OFS = "\57"
}
NR == FNR {
t = $NF;...
5,761
Posted By radoulov
The script should be OK. Yes, same usage.
The script should be OK.
Yes, same usage.
5,761
Posted By radoulov
Try swapping the input files.
Try swapping the input files.
5,761
Posted By radoulov
Change the script like this: #!...
Change the script like this:

#! /usr/bin/nawk -f

BEGIN {
FS = OFS = "\57"
}
NR == FNR {
t = $NF; sub(/\/[^\/]*$/, "")
_[$0] = t; next
}
{
t = $NF; sub(/\/[^\/]*$/, "")
if...
5,761
Posted By radoulov
Something like this may work with GNU Awk: ...
Something like this may work with GNU Awk:


awk 'BEGIN {
FS = OFS = "\57"
}
NR == FNR {
t = $NF; NF = NF - 1
_[$0] = t; next
}
{
t = NF; NF = NF - 1
if ($0 in _ && _[$0] > t)...
5,761
Posted By radoulov
Could you provide an example, please? ...
Could you provide an example, please?



ASCII octal for /.
5,761
Posted By radoulov
Use nawk or /usr/xpg4/bin/awk on Solaris: ...
Use nawk or /usr/xpg4/bin/awk on Solaris:

awk -F'\57' 'NR == FNR {
_[$1] = $2
next
}
$1 in _ && _[$1] > $2
' set2 set1



$ head set*
==> set1 <==
a.cpp@@main/5
b.cpp@@main/6
...
Showing results 1 to 7 of 7

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