Skip to content

Tag: environment-variables

preserve inline variable with sudo

Hi i’m trying to make something like this to work in bash but i keep getting an empty line, the only thing that works so far is: what i would like to achieve is the ability to inline a variable for the sudo command i also tried this as suggested here but with no luck, am i missing something? Answer

Adding to $PYTHONPATH with bash script

I wrote a bash script to add to my $PYTHONPATH. My .sh file has the following: What I want to be added to my .bashrc is: However I can only get it to add: I don’t want the actual $PYTHONPATH value to be added to my .bashrc, just the variable name. Please help! Answer Use single-quotes: The shell does no…