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 ArticleHow 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
More Pages to Explore .....