https://www.jb51.net/article/135168.htm
1 向脚本传递参数
chmod + x file.txt
./test.sh file.txt
cat test.sh
#!/bin/bash -xv
echo $1
2 如何在脚本中使用参数 ?
cat copy.sh
#!/bin/bash -xv
cp $1 $2
https://www.jb51.net/article/135168.htm
1 向脚本传递参数
chmod + x file.txt
./test.sh file.txt
cat test.sh
#!/bin/bash -xv
echo $1
2 如何在脚本中使用参数 ?
cat copy.sh
#!/bin/bash -xv
cp $1 $2