访问bash参数和命令

时间:2016-03-28 18:34:21

标签: linux bash shell command-line command-line-arguments

有很多关于访问-a类型参数的信息 但我想用这样的用法创建一个脚本,实际上我已经写了帮助文本

usage: pubkeys command options

This script mannages your public keys.

Commands:
        add - Add public key(s) to your authorized_keys file
        get - Echo public key(s)
        remove - Remove public key(s) from your authorized_keys file

OPTIONS:
   -h   Show this help message
   -u   specify user, default is current user
   -v   Display Version and exit

如何访问“命令”,然后才解析选项?

0 个答案:

没有答案