I would like to know, if there is a way to go through a shell script and getting a warning for every command, that is unknown.I know bash -n for syntax checking, but it doesn't tell me, if there are commands, that are not available.Running the code is not an option, of course.
How to test for unknown commands in shell script?
bash;shell script
It's not possible in general, because a script can contain something likeread $command$command -rf /In real life, the command would be sanitized or picked from a list, but still, it's not possible to know in advance what commands are possible.