|
|
bash-3.00# cat 1.sh
#!/bin/sh
echo \[$0\] number of args = $#
echo \[$0\] args = $*
./2.sh $*
bash-3.00# cat 2.sh
#!/bin/sh
echo \[$0\] number of args = $#
echo \[$0\] args = $*
bash-3.00# ./1.sh "\"hello world\" test"
[./1.sh] number of args = 1
[./1.sh] args = "hello world" test
[./2.sh] number of args = 3
[./2.sh] args = "hello world" test
我想让1.sh的命令行参数原封不动的传送给2.sh, 要怎么写?请大虾帮忙 |
|