1.. filename # 注意点号(.)和文件名中间有一空格
1.#!/bin/bash
2.
3.
4.url="https://fatcatsk.github.io/"
1.#!/bin/bash
2.
3.#使用 . 号来引用test1.sh 文件
4.. ./test1.sh
5.
6.# 或者使用以下包含文件代码
7.# source ./test1.sh
8.
9.echo "shell学习笔记网地址:$url"
1.$ chmod +x test2.sh
2.$ ./test2.sh
3.shell学习笔记网地址:https://fatcatsk.github.io/
1.[root@localhost lcr]# vim name.sh
2.[root@localhost lcr]# vim echo.sh
3.[root@localhost lcr]# chmod +x echo.sh
4.[root@localhost lcr]# ./echo.sh
5.LCR
1.#!/bin/bash
2.
3.myname=LCR
1.#!/bin/bash
2.
3.. ./name.sh
4.
5.echo $myname
1.#!/bin/bash
2.
3.read myname
1.[root@localhost lcr]# ./echo.sh
2.LCR
3.LCR