echo "上一次后台pid is $!"
echo "当前进程pid is $$"
echo "last command return code is :$?"
echo "bash file name is $0"
echo "all var is: $*"
echo "var number is : $# "

===========gold  line of out=========

上一次后台pid is
当前进程pid is 53971
last command return code is :0
bash file name is echo_var.sh
all var is: 1 44 test this
var number is : 4

 

获取脚本name和脚本目录:

basename   filepath 

dirname   filepath 

shell  预定义变量

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-05-18
  • 2022-02-22
  • 2021-06-28
  • 2021-05-18
  • 2021-08-31
猜你喜欢
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-04-30
  • 2021-07-02
相关资源
相似解决方案