zoukankan      html  css  js  c++  java
  • 好用的SHELL小编程

    1》判断输入为数字,字符或其他

              脚本代码:

                 

           检测结果:

                

    2》求平均数:

           

          测试效果:

                 

    3》自减输出:

          脚本代码:

          

          测试效果:

               

    4》在文件中添加前缀:

             脚本代码:

               

           效果显示:

                

    5》批量测试文件是否存在:

           脚本代码:

               

            测试结果;

                  

    6》用指定大小文件填充硬盘

          用指定大小文件格式化后挂载:

                     

          脚本代码:

             

        效果显示:

             

                    

    7》通过遍历的方法读取配置文件

              相关文件:

               

             脚本代码:

                

          测试结果:

              

    8》简单正则表达式应用

        1>匹配正常字符并按顺序输出:

          脚本代码:

                

        测试结果:

              

         2>测试输入的是否为整数:

          脚本代码:

                                 测试结果:

                 

     

  • 相关阅读:
    VS2008编写MFC程序--使用opencv2.4()
    November 02nd, 2017 Week 44th Thursday
    November 01st, 2017 Week 44th Wednesday
    October 31st, 2017 Week 44th Tuesday
    October 30th, 2017 Week 44th Monday
    October 29th, 2017 Week 44th Sunday
    October 28th, 2017 Week 43rd Saturday
    October 27th, 2017 Week 43rd Friday
    October 26th, 2017 Week 43rd Thursday
    October 25th, 2017 Week 43rd Wednesday
  • 原文地址:https://www.cnblogs.com/xiaocheche/p/7778049.html
Copyright © 2011-2022 走看看