Linux Shell 脚本提示 “source: not found” 解决方法
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
shell脚本里面执行source命令提示错误
报错:source: not found
原因:sh 和 bash 是不同的 shell,sh中没有 source 命令。所以用 sh 或者 ./ 运行的时候,会提示这个错误
解决办法如下
//原来的脚本
#!/bin/sh
umask 022
source /etc/profile
//修改后脚本
#!/bin/bash //修改位置
umask 022
source /etc/profile
即可
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:1 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献7条内容
所有评论(0)