I have some installation instructions but they use pathmunge
which caused me an error in Ubuntu. What is the equivalent syntax to the following script to do the same in Ubuntu?
/etc/profile.d/openssl.sh
pathmunge /usr/local/openssl/bin
I did add pathmunge command to Ubuntu using this answer:
run nano ~/.bashrc && source ~/.bashrc
and paste this:
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
When I login, I get this error:
pathmunge
withexport
is all what it needs? – user9371654 Aug 05 '18 at 03:25export PATH=$PATH:/usr/local/openssl/bin
– Sergiy Kolodyazhnyy Aug 05 '18 at 03:37export
PATH though, because it is already in the environment (you can think of it as being already exported) (cc @SergiyKolodyazhnyy). It's enough to writePATH=$PATH:/thing/I/want/to/append
– Zanna Aug 05 '18 at 16:17