当前位置:网站首页>(10) File contains

(10) File contains

2022-07-27 11:22:00 Hungry Taibai Xingjun

#!/bin/bash

echo "  Include external scripts   grammar : . filename # .  and  filename There's a space between   perhaps  source filename "

#  example 
echo "  Create two shell Script :test1.sh、test2.sh"

echo " test1.sh  The contents are as follows :"

:<< EOF
#!/bin/bash
url="www.xxxxxxxxxxx.com"
EOF

echo " test2.sh  The contents are as follows :"
:<< eof
#!/bin/bash
. ./test1.sh

# source ./test1.sh
echo " Website : $url"
eof

echo "  to test2.sh  Add executable permissions and execute  chmod +x test2.sh ./test2.sh"

#  notes : Included files  test1.sh  No executable permissions are required .

原网站

版权声明
本文为[Hungry Taibai Xingjun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/200/202207170002269436.html