Set VSX environment in /bin/sh scripts

One time a Unix demigod yelled at me in public because I was writing my shell script in bash instead of /bin/sh. You’d think I drew a comic strip of {can’t speak of this religious figure because it has incited wars}. I mean it was like religion. I’ve been damaged goods ever since. Now I write my scripts in sh just because I’m afraid he’ll be lurking around the corner.

So in VSX and maybe its a GAIA thing, if you write your scripts in /bin/sh, you’ll notice you can’t access ‘vsenv’. The reason is the profile didn’t execute the /etc/profile.d/ script that inserts VSX functions into your /bin/sh environment.

So your scripts need to include:



. /etc/profile.d/

Forgive me for my sins,


Post a comment or leave a trackback: Trackback URL.


  • Peter  On June 25, 2014 at 4:41 am

    Hello, I’m experiencing strange behavior of iproute2 “/sbin/ip route show” works perfectly if called from a login shell, but it does not if called from my script, which sources & Any CP util is working like a charm. Strange…

    • Dreezman  On June 25, 2014 at 4:54 am

      can you do a
      echo $PATH

      and compare environments?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Helen's Loom

"Peculiar travel suggestions are dancing lessons from God." - Kurt Vonnegut

Life Stories from Dreez

These are stories from my travels. Generally I like to write stories about local people that I meet and also brag about living the retirement dream with my #1 wife Gaby. She is also my only wife.

%d bloggers like this: