如何使用函数库

1
2
3
4
5
6
7
8
9
10
$ cat .bashrc
...

# 每次启动一个新shell的时候,都会由shell重新载入函数库
. ~/libraries/basicfuncs

# none interactive shell environment init (before shell script executing)
# 为非交互式shell引入函数库,避免脚本重复定义
BASH_ENV=~/.none_interactive_bashrc
export BASH_ENV
1
2
3
$ cat .none_interactive_bashrc
. ~/libraries/basicfuncs
NONE_INTERACTIVE_ARG="Aloah"