I\'m trying to run some third party bash scripts from within my ruby program.
Before I can run them they require me to source a file. On the command line it all wor
I did this because I didn't want to have to write a file or mix up my ruby code with this stuff:
#!/usr/bin/env bash eval $(echo "$(cat .env) $1" | tr '\n' ' ')
I put this in ~/bin/run_with_env.sh and then for example I can run:
% run_with_env.sh "rails console"