Search Results

Search: Posts Made By: Yoda
2,144
Posted By Yoda
awk -F'[=,]' ' { V[++n] = $2 ...
awk -F'[=,]' ' {
V[++n] = $2
R[n] = $0
} END {
for ( i = 1; i <= n; i++) {
if(V[i+1] > 0)
print R[i], ((V[i] - V[i+1]) / V[i]) *...
2,144
Posted By Yoda
As per the formula, the results are correct: ...
As per the formula, the results are correct:
jime=8,yime=1.23243,lime=[Mar-12-(UTC)],lap=985434334,-700,# Formula: (1 - 8) / 1 * 100...
2,144
Posted By Yoda
You have to change the divisor accordingly...
You have to change the divisor accordingly depending on if value is increasing or decreasing to get expected result:
awk -F'[=,]' ' {
V[++n] = $2
R[n] = $0
} END {
for (...
2,144
Posted By Yoda
If you want to run it in single line, then you...
If you want to run it in single line, then you have to use semi-colon ; to separate statements:
awk -F'[=,]' '{V[++n]=$4;R[n]=$0}END{for(i=1;i<=n;i++) print R[i],(V[i]-V[i+1])/V[i]*100}' OFS=, file
2,144
Posted By Yoda
Is this what you are looking for? awk -F'[=,]'...
Is this what you are looking for?
awk -F'[=,]' ' {
V[++n] = $4
R[n] = $0
} END {
for ( i = 1; i <= n; i++ )
print R[i], (...
Showing results 1 to 5 of 5

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