fridojet
fridojet

Reputation: 1296

sh: How to extend environment variables?

Everywhere you can read how to replace environment variables. But I want to insert a new path at the beginning of my $PATH variable. What's the simplest way to do this using sh?

Upvotes: 4

Views: 3901

Answers (1)

Alex Howansky
Alex Howansky

Reputation: 53626

Just assign it a new value that includes the old:

PATH=/new/path:${PATH}

Upvotes: 8

Related Questions