Skip to content

Conversation

@SuperiorArri
Copy link

When the PID is passed to the script like this:

$ procmap 224276

The script outputs a confusing message:

Error: Invalid PID (must be a positive integer)

The message was changed to this one:

Specifying a valid PID with -p|--pid=<PID> is mandatory

Note: There is still a duplicate line of code that needs to be addressed.

… is still a duplicate line of code that needs to be addressed.
Copy link
Owner

@kaiwan kaiwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly check out the review comment & address, thanks

shift $((OPTIND-1))

[[ ${PID} -eq 0 ]] && err 0 "Error: Invalid PID (must be a positive integer)"
[[ ${PID} -eq 0 ]] && err 0 "Specifying a valid PID with -p|--pid=<PID> is mandatory"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right; can you make the err msg as:
"Specifying a valid PID with -p <PID> or --pid=<PID> is mandatory"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants