zl程序教程

您现在的位置是:首页 >  系统

当前栏目

Linux Shell脚本之常用参数

Linuxshell 常用 参数 脚本
2023-09-14 09:13:16 时间

Linux Shell脚本之常用参数

1. 常用参数

$#:is a special variable that returns the number of arguments;else, it cant return length of string
$1:is a first argument
$2 :is a second argument
$n: is a ned argument

  • example 1
[root@server4 shells]# string='hello spark'
[root@server4 shells]# echo ${#string}
11