shebang line not working in R script

杀马特。学长 韩版系。学妹 提交于 2019-12-03 11:17:42

Make the file executable.

chmod 755 shebang.r

In addition to Sjoerd's answer... Only the directories listed in the environment variable PATH are inspected for commands to run. You need to type ./shebang.r (as opposed to just shebang.r) if the current directory, known as ., is not in your PATH.

To inspect PATH, type

echo $PATH

To add . to PATH, type

export PATH="$PATH:."

You can add this line to your ~/.bashrc to make it happen automatically if you open a new shell.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!