What is the purpose of this bash script? (It is a portion of a larger script.)
if [ $# -gt 0 ]
then
case $1 in
-*) ;;
*) exec $* ;;
esac
fi
A related question:
https://stackoverflow.com/questions/2046762/problem-with-metamap-inappropriate-ioctl-for-device
In English, line-by-line:
if the number of arguments is greater than 0
then
if the first argument...
starts with '-', do nothing
else, "exec" the arguments (run the entire set of arguments as a command replacing this process, not as a child process)
(end of case)
(end of if)
Not knowing any bash scripting I'd say this
- it does nothingIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With