美文网首页
shell select 用法

shell select 用法

作者: SkTj | 来源:发表于2019-03-01 10:35 被阅读0次

    !/bin/bash

    select i in a b c d
    do
    case $i in
    a)
    echo "Your choice is a"
    ;;
    b)
    echo "Your choice is b"
    ;;
    c)
    echo "Your choice is c"
    ;;
    d)
    echo "Your choice is d"
    ;;
    *)
    echo "Wrong choice! exit!"
    ;;
    esac
    done

    相关文章

      网友评论

          本文标题:shell select 用法

          本文链接:https://www.haomeiwen.com/subject/xhwruqtx.html