zoukankan      html  css  js  c++  java
  • shell中通过读取输入yes no判断下一步如何处理

        

                        if [ -d $r_item_rmgit ];then
                                read -p "$r_item_rmgit exit, replace it [Y/n]: " REPLACE
                                case $REPLACE in
                                    [yY][eE][sS]|[yY])
                                    REPLACE="yes"
                                    echo "replace $r_item_rmgit."
                                    rm -rf $r_item_rmgit
                                    ;;
                                    [nN][oO]|[nN])
                                    REPLACE="no"
                                    echo "do not replace $r_item_rmgit."
                                    ;;
                                    *)
                                    echo "Input error, should be [Y/n]."
                                    exit 1
                                esac    
                            fi

  • 相关阅读:
    mybatis 二级缓存
    前端学习记
    消息队列高手课 笔记11
    cache业务
    这个前端课程主要讲mui框架
    spring cloud stream
    最近学习freemarker
    说点什么
    即将进入Windows 11时代,DevExpress控件将会有哪些改变呢?
    UI开发框架Kendo React R3 2021更新亮点——新的 React 组件
  • 原文地址:https://www.cnblogs.com/idyllcheung/p/11547352.html
Copyright © 2011-2022 走看看