shell脚本

2020-07-25  本文已影响0人  魔芋辣椒

一、脚本运行

$mkdir bin;cd bin
$vim hello.sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
echo -e "hello world! \a \n"
exit 0

此类方法相当于开辟子bash,在子bash中运行,不影响父bash,若想在父bash中运行,则 source hello.sh

上一篇 下一篇

猜你喜欢

热点阅读