- 论坛徽章:
- 84
|
本帖最后由 yjh777 于 2019-04-04 22:12 编辑
- $ go run main_cmdline.go -h -H -f file --file file2 -e 's/abc/xyz/' -r -n -s=A -oa=b -S '' -i -x xfile --wenj=file3 --www -aa -vvv -S DD -- -0 -y
- Debug info:
- --------------------------------------------------------------------------------
- [-h -H -f file --file file2 -e s/abc/xyz/ -r -n -s=A -oa=b -S -i -x xfile --wenj=file3 --www -aa -vvv -S DD -- -0 -y]
- Options group1:
- -h -H --help out put the usage info
- -f -F --file {arg} file to be parse
- -o [arg] mount option
- -v verbose output, -vvv means verbose level 3
- -x <arg> dump binary file to text
- -s <arg> enable smart mode
- Options group2:
- -e {arg} sed -e option, will forward to child sed process
- -r sed -r option, will forward to child sed process
- -n sed -n option, will forward to child sed process
- Comments:
- * [arg] means arg is optional, need use --opt=arg to specify an argument
- <arg> means arg is required, and -f a -f b will get the latest 'b'
- {arg} means arg is required, and -f a -f b will get a list 'a b'
- * if arg is required, '--opt arg' is same as '--opt=arg'
- * '-opt' will be treated as:
- '--opt' if 'opt' is defined;
- '-o -p -t' if 'opt' is undefined;
- '-o -p=t' if 'opt' is undefined and '-p' need an argument;
- opt(help) = []string{"set", "set"}
- opt(f) = []string{"file", "file2", "file3"}
- opt(s) = []string{"DD", "", "A"}
- opt(x) = []string{"xfile"}
- opt(v) = []string{"set", "set", "set"}
- opt(h) = []string{"set", "set"}
- opt(H) = []string{"set", "set"}
- opt(o) = []string{"a=b"}
- opt(F) = []string{"file", "file2", "file3"}
- opt(file) = []string{"file", "file2", "file3"}
- option: 'i' undefined
- option: 'www' undefined
- option: 'a' undefined
- option: 'a' undefined
- params: []string{"-0", "-y"}
- forward: []string{"-e s/abc/xyz/", "-r", "-n"}
- --------------------------------------------------------------------------------
- Usage: ...
- file list: []string{"file", "file2", "file3"}
- verbose level: 3
- smart mode: "DD"
复制代码 |
|