Quantcast
Channel: How to `exec` process with custom env? - Unix & Linux Stack Exchange
Browsing all 2 articles
Browse latest View live

Answer by Stephen Harris for How to `exec` process with custom env?

When using bash -c type structures you need to put the whole command inside " characters. e.g $ bash -c echo hello $ bash -c "echo hello" hello So in your case env bash -c "exec ruby script.rb"...

View Article



How to `exec` process with custom env?

I'm programmatically spawning processes in bash. I need to be able to pass in arbitrary environment variables and commands. To achieve this I'm running /usr/bin/env and then calling bash -c. Sometimes...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images