|
awk '!/0$/' $FILE > $OUTPUT |
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.
artifactory-scripts/requestToUsage/requestToUsage.sh
Line 10 in 732dc1c
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
0but would be greater than0, like1234567890.Log format changed since then and now
request.logentry 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
awkcommand with:cat $FILE > $OUTPUTIt will copy all the lines from
request.loginto CSV file without cutting anything and script remains functional.