Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法通过 shell 脚本访问“用户条目”,以下命令中断错误( ls: cannot access '~/Workspace': No such file or directory )
ls ~/Workspace ls "~/Workspace" ls "\~/Workspace"
通过终端命令上述工作正常。有任何想法吗? 我使用的 Fedora 25 没有进行重大定制。谢谢。
您确定该用户的主目录中存在“工作区”目录吗?
无论如何,试试这个:
#!/bin/bash ls $HOME/Workspace