Linux shell 函数传递参数的几种方式

最近总结了 shell 中 function 的传递变量的几种方式 1.传递单个变量 2.传递数组变量 #!/bin/bash #trying to pass an variable.web function func() { echo 'The number of parameters is: ${#}' for line in '$@' do echo '$line' done }shell
相关文章
相关标签/搜索