I assume the intention was to skip lines with zero transfer bytes when log format was keeping that data at the end of log line.
Even then, this would remove valid lines if byte number will just end with 0 but would be greater than 0, like 1234567890.
Log format changed since then and now request.log entry has user agent at the end. That field may still end with 0.
Examples: curl/7.29.0, Artifactory/7.12.6 71206900.
Easiest workaround is to replace awk command with:
cat $FILE > $OUTPUT
It will copy all the lines from request.log into CSV file without cutting anything and script remains functional.
https://github.com/jfrog/artifactory-scripts/blob/732dc1cc047506137cb87981781845e58497e318/requestToUsage/requestToUsage.sh#L10
I assume the intention was to skip lines with zero transfer bytes when log format was keeping that data at the end of log line. Even then, this would remove valid lines if byte number will just end with
0
but would be greater than0
, like1234567890
.Log format changed since then and now
request.log
entry has user agent at the end. That field may still end with0
. Examples:curl/7.29.0
,Artifactory/7.12.6 71206900
.Easiest workaround is to replace
awk
command with:cat $FILE > $OUTPUT
It will copy all the lines fromrequest.log
into CSV file without cutting anything and script remains functional.