I have a program that does a LOT of env manipulation. It sets PYTHONPATH and LD_LIBRARY_PATH and stuff like that.
This program needs to run ANOTHER program, but in a fresh env, without all of the env manipulation, but WITH the base env from rc files.
I thought I'd be able to do this with csh -c but that keeps the current env. Is there a good way to do this?
It doesn't really matter what shell I use for this. Also note that I need the original .rc files, so env -i doesn't quite work for me. (I suppose I could hack something together with env and bash -cl, but there should be a nicer method)
ssh localhost command
as suggested by Gilles in the Q&A posted by @manatwork might be your best bet. – terdon Nov 11 '13 at 19:23