Skip to content

cpumemlog: $STR picks up -t option #2

@stefanedwards

Description

@stefanedwards

If giving the -t option to cpumemlog, but not the optional string, the -t argument gets picked up as $2. Here are some examples, where the printed line is the resolved output filename.

$ ./cpumemlog 1
cpumemlog_1.txt

$ ./cpumemlog 1 lala
cpumemlog_1_lala.txt

$ ./cpumemlog 1 lala -t=5
cpumemlog_1_lala.txt

$ ./cpumemlog 1 -t=5
cpumemlog_1_-t=5.txt

This does not occur when specifying an output filename (with the -o option cf. my pull request #1).

It can be solved by updating the routine in lines 60-70 (##Get options) to work with positional arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions