You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shellcheck currently recommends to use pgrep instead of ps | grep. That's fine... if one's on a system with pgrep, but pgrep is not POSIX and not everyone has pgrep (for example AIX).
I'm not sure what the project's stance is recommending the user away from POSIX. I'm inclined to think it should not, particularly if one is targeting /bin/sh or /bin/ksh, but at the very least the wiki should make a note that the error should be ignored if POSIX compliance is important or if the target system lacks the command/option.
The text was updated successfully, but these errors were encountered:
Hi, I see the same issue and need to deactivate it every single time. Thanks to @tim78245 for opening up.
I agree that moving away from posix to a non-standard-tool is not a good recommendation, especially when all other suggestions try to push you to moving to POSIX standards. ;-)
For bugs
Shellcheck currently recommends to use
pgrep
instead ofps | grep
. That's fine... if one's on a system with pgrep, but pgrep is not POSIX and not everyone has pgrep (for example AIX).See also #2449 in which SC2012 does the same.
I'm not sure what the project's stance is recommending the user away from POSIX. I'm inclined to think it should not, particularly if one is targeting /bin/sh or /bin/ksh, but at the very least the wiki should make a note that the error should be ignored if POSIX compliance is important or if the target system lacks the command/option.
The text was updated successfully, but these errors were encountered: