We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was watching your video on secure scripting and was interested in your no path script in zet 20220109171814
There is a issue with the script in that you cannot pass arguments to the target script executed
To fix shift the ARGV stack down and add $@ to the exec which will also need the quotes removing to stop exec getting confused
#!/bin/sh cmd='which $1' export PATH= shift exec $cmd $@
Note replace the ' with a backquote (iPhone keyboard has no backtick
Also the script on the video said which $2 rather than which $1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was watching your video on secure scripting and was interested in your no path script in zet 20220109171814
There is a issue with the script in that you cannot pass arguments to the target script executed
To fix shift the ARGV stack down and add $@ to the exec which will also need the quotes removing to stop exec getting confused
#!/bin/sh$cmd $ @
cmd='which $1'
export PATH=
shift
exec
Note replace the ' with a backquote (iPhone keyboard has no backtick
Also the script on the video said which $2 rather than which $1
The text was updated successfully, but these errors were encountered: