What is $opt variable for command line parameter in bash

前端 未结 3 985
[愿得一人]
[愿得一人] 2021-01-20 10:42

I have below bash script, I am a bit confuse about what is $opt meaning. and I do not find detail information about it after search.

test.sh:

echo

3条回答
  •  失恋的感觉
    2021-01-20 11:16

    $opt is not a built-in or special variable. If it's mentioned in the script (outside of for opt without the in something part, which @mhawke already explained) it should either be defined earlier in the script or it's expected that it is exported before running the script.

提交回复
热议问题