Instantly share code, notes, and snippets.
Unless I'm missing some weird intricacy of how bash works, I'm pretty sure this sets those variables for any other scripts you call in your shell session too (which might be what you wanted). You could try https://gist.github.com/664234 if it isn't.
I'm far from a bash expert, but my understanding is that exports in scripts only affect child processes of that script, but not the parent environment. This was a surprise to me.
If I run rmem on the command line and then run env, I don't see these settings. But I can get them to 'stick' by running . rmem.
My testing has confirmed this, but I could easily have missed something about how bash works.
Huh, cool. I didn't know that. Thanks for the blog post! I'm still playing around with settings a bit, but I'm down from 25 minutes to about 410 seconds :D