亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

set后顯示內容是否正常?

? cmdOpts=${cmdOpts/ --no-newline / }
??????????? ;;
??????????? --no-newline)
??????????????? cmdOpts=${cmdOpts/ -n / }
??????????? ;;
??????????? -h)
??????????????? cmdOpts=${cmdOpts/ --help / }
??????????? ;;
??????????? --help)
??????????????? cmdOpts=${cmdOpts/ -h / }
??????????? ;;
??????????? -c)
??????????????? cmdOpts=${cmdOpts/ --committed / }
??????????? ;;
??????????? --committed)
??????????????? cmdOpts=${cmdOpts/ -c / }
??????????? ;;
??????? esac;
??? done;
??? COMPREPLY=($( compgen -W "$cmdOpts" -- $cur ));
??? return 0
}
_sysvdirs ()
{
??? sysvdirs=();
??? [[ -d /etc/rc.d/init.d ]] && sysvdirs+=(/etc/rc.d/init.d);
??? [[ -d /etc/init.d ]] && sysvdirs+=(/etc/init.d);
??? [[ -f /etc/slackware-version ]] && sysvdirs=(/etc/rc.d)
}
_terms ()
{
??? COMPREPLY+=($( compgen -W???????? "$( sed -ne 's/^\([^[:space:]#|]\{2,\}\)|.*/\1/p' /etc/termcap???????????? 2>/dev/null )" -- "$cur" ));
??? COMPREPLY+=($( compgen -W "$( { toe -a 2>/dev/null || toe 2>/dev/null; }???????? | awk '{ print $1 }' | sort -u )" -- "$cur" ))
}
_tilde ()
{
??? local result=0;
??? if [[ $1 == \~* && $1 != */* ]]; then
??????? COMPREPLY=($( compgen -P '~' -u "${1#\~}" ));
??????? result=${#COMPREPLY[@]};
??????? [[ $result -gt 0 ]] && compopt -o filenames 2> /dev/null;
??? fi;
??? return $result
}
_ufw ()
{
??? cur=${COMP_WORDS[COMP_CWORD]};
??? prev=${COMP_WORDS[COMP_CWORD-1]};
??? if [ $COMP_CWORD -eq 1 ]; then
??????? COMPREPLY=($( compgen -W "$(_ufw_commands)" $cur ));
??? else
??????? if [ $COMP_CWORD -eq 2 ]; then
??????????? case "$prev" in
??????????????? app)
??????????????????? COMPREPLY=($( compgen -W "$(_ufw_app_commands)" $cur ))
??????????????? ;;
??????????????? status)
??????????????????? COMPREPLY=($( compgen -W "$(_ufw_status_commands)" $cur ))
??????????????? ;;
??????????????? delete)
??????????????????? COMPREPLY=($( compgen -W "$(_ufw_rule_commands)" $cur ))
??????????????? ;;
??????????????? logging)
??????????????????? COMPREPLY=($( compgen -W "$(_ufw_logging_commands)" $cur ))
??????????????? ;;
??????????????? show)
??????????????????? COMPREPLY=($( compgen -W "$(_ufw_show_commands)" $cur ))
??????????????? ;;
??????????????? default)
??????????????????? COMPREPLY=($( compgen -W "$(_ufw_default_commands)" $cur ))
??????????????? ;;
??????????? esac;
??????? fi;
??? fi
}
_ufw_app_commands ()
{
??? ufw --help | sed -e '1,/^Application profile commands:/d' -e '/^ [^ ]/!d' -e 's/[ \t]\+app[ \t]\+\([a-z|]\+\)[ \t]\+.*/\1/g'
}
_ufw_commands ()
{
??? commands=$(ufw --help | sed -e '1,/^Commands:/d' -e '/^Application profile commands:/Q' -e 's/^[ \t]\+\([a-z|]\+\)[ \t]\+.*/\1/g' -e 's/|/ /g' | uniq);
??? echo "$commands app"
}
_ufw_default_commands ()
(未完)

正在回答

1 回答

你是用的Linux版本是CentOS7 嗎? CentOS7 使用set命令后,顯示就是這樣的

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
shell編程之變量
  • 參與學習       51506    人
  • 解答問題       82    個

主要介紹Linux shell編程基礎中的變量,熟練使用shell中用戶自定義變量

進入課程

set后顯示內容是否正常?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號