Skip to content

Script requestToUsage.sh skips lines ending with zero, leading to wrong calculations #51

@vizzard

Description

@vizzard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions