Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flexlm_licence_usage.sh modification  #4

Open
randynana opened this issue Dec 9, 2020 · 2 comments
Open

flexlm_licence_usage.sh modification  #4

randynana opened this issue Dec 9, 2020 · 2 comments

Comments

@randynana
Copy link

Thanks for your contribution, I am using flexlm_licence_usage.sh with two modifications.
1 Since the feature name is searched by prefix match, multiple features will be applicable and an error will occur.
modified line 75 and 77.
value=$( awk "/ $ARG2 /{print ,,,,
2An error will occur if the feature name contains metacharacters.
add to line 16.
ARG2=${ARG2////\/}

@speculatrix
Copy link
Owner

that's cool, I'll review your suggestion.

I'm not in the same job any more where I used this, so I can only make the change using visual inspection of the code.

thanks very much,
Paul

@hullio1979
Copy link

hullio1979 commented Feb 14, 2021

I was seeing the error in the awk command on one of my services because features had similar names. I updated the script to the following and it worked / removed the error.

value=$( awk "/\<$ARG2\>/{print \$6 }" < "$STAT_FILE" )

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

No branches or pull requests

3 participants