shell中的函数参数

来源:互联网 发布:诗经楚辞取名 知乎 编辑:程序博客网 时间:2024/04/27 21:49


  #!/bin/bash    func_1()  {            echo $1  }    str="jeguan hello" //注意引号在这里的作用  func_1 "$str"   echo "please pay attention to the missed \"\""  func_1 $str       //不带引号的时候

运行结果:jeguan helloplease pay attention to the missed ""jeguan




0 0
原创粉丝点击