Search Results

Search: Posts Made By: vgersh99
3,647
Posted By vgersh99
n=split($i,a,":") for field 0:29:0:0:0:0 results...
n=split($i,a,":") for field 0:29:0:0:0:0 results in

n=6 # 6 elements from string '0:29:0:0:0:0' separated by ':'
a[1]=0
a[2]=29
a[3]=0
a[4]=0
a[5]=0
a[6]=0
'j' is just a temporary iterator...
3,647
Posted By vgersh99
sorry, a tiny boo-boo: { f=0 ...
sorry, a tiny boo-boo:

{
f=0
for(i=4;i<=NF;i++) {
n=split($i,a,":")
s=0
for(j=1;j<n;j++) s+=a[j]
if (s>=8)
...
3,647
Posted By vgersh99
for(j=1;j<=n;j++) s+=a[j]
for(j=1;j<=n;j++) s+=a[j]
3,647
Posted By vgersh99
ah, ok: { f=0 ...
ah, ok:

{
f=0
for(i=4;i<=NF;i++) {
n=split($i,a,":")
s=0
for(j=1;j<n;j++) s+=a[j]
if (s>=8) f++
}
}
f==(NF-4)
3,647
Posted By vgersh99
awk -f path.awk myInputFile where path.awk is: ...
awk -f path.awk myInputFile where path.awk is:

{
f=0
for(i=4;i<=NF;i++) {
n=split($i,a,":")
s=0
for(j=1;j<n;j++) s+=a[j]
if (s>=8) {
f++
break
}
}...
Showing results 1 to 5 of 5

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