#!/bin/bash
#print hello world in the console window
a="Hello,World"
echo "A is:" $a

赋值符号左右两边不能有空格,否则语法错误。

 

num=2

echo "this is ${num}d"

用{}将变量名括起来,起到确定变量名的作用

 

获取命令行参数总数 $#

 

后台执行,模拟多进程 

#!/bin/bash
rsync .... &
rsync .... &
...

相关文章:

  • 2021-09-12
  • 2021-10-31
  • 2022-01-20
  • 2021-09-01
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
猜你喜欢
  • 2021-12-01
  • 2021-07-14
  • 2021-08-15
  • 2022-01-06
  • 2022-12-23
相关资源
相似解决方案