I'm trying to write a simple C# function to validate a full Unix path to a shell script entered by a user to avoid a couple of things:
- The path is in correct format, no invalid symbols, like spaces or semi-colons
- There are no suspicious commands, e.g. \[code\]rm -rf /\[/code\]
- The path represents a full path, no relatives
- It does not matter if the script actually exists