Modifying environment variable for a process with scala.sys.process?

前端 未结 1 811
孤城傲影
孤城傲影 2021-01-04 07:23

I want to run my process from scala, with several environment variables modified. For example:

Seq(\"bash\",\"echo $asdf\") !

and $asdf set

相关标签:
1条回答
  • 2021-01-04 07:53
    Process(Seq("bash", "-c", "echo $asdf"), None, "asdf" -> "Hello, world!").!
    

    See Process.

    0 讨论(0)
提交回复
热议问题