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

db2mon script throwing error in Ubuntu 20.4 intermiddently #75

Open
sonalkakode1 opened this issue Oct 25, 2023 · 1 comment
Open

db2mon script throwing error in Ubuntu 20.4 intermiddently #75

sonalkakode1 opened this issue Oct 25, 2023 · 1 comment

Comments

@sonalkakode1
Copy link

/home/db2inst1/sqllib/samples/perf/db2mon.sh: 49: [: 60: unexpected operator

https://github.com/IBM/db2-samples/blob/master/perf/db2mon.sh

@kdrodger
Copy link
Member

Good catch. I am surprised you're saying this is only intermittent. At first glance I suspect the problem is that the == operator isn't technically correct /bin/sh syntax and should just be = instead.

If I'm not mistaken that version of Ubuntu links sh to dash and because of that only implements POSIX compliant sh syntax, which == isn't. It's fairly common in other distros to link sh to bash instead, which is why it is usually just fine, since that is acceptable bash syntax.

You could probably easily try that out by making that change locally for yourself. I'll certainly be curious if that works for you. You're even welcome to submit a PR to correct it but I'll also work to get that addressed on our end.

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

2 participants