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.
当我想运行我的 Scala 项目时,我cd到项目目录并执行
cd
$ sbt "run arg1"
如何从项目目录之外执行相同的操作?
我的回答受到了这个更普遍的问题的启发:如何从 Linux shell 运行具有与当前工作目录不同的工作目录的程序?
(cd myPath/; sbt "run arg1")
或者
(cd myPath/ && exec sbt "run arg1")