Linux| Linux的.的使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011479200/article/details/87884101
[taoge@localhost Desktop]$ cat a.sh 
#! /bin/bash
echo "shell script"
export z="f(x) + f(y)"
[taoge@localhost Desktop]$ ./a.sh 
shell script
[taoge@localhost Desktop]$ echo $z

[taoge@localhost Desktop]$ . ./a.sh 
shell script
[taoge@localhost Desktop]$ echo $z
f(x) + f(y)
[taoge@localhost Desktop]$ 

注意: .相当于source命令

参考:
https://blog.csdn.net/stpeace/article/details/45588597

猜你喜欢

转载自blog.csdn.net/u011479200/article/details/87884101