سؤال

I have the following in my bash_profile to automatically run the smlnjinterpreter:

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/smlnj-110.74/bin:${PATH}"
export PATH

Additionally I would also like to run theswi prolog interpreter by adding its path at:

\opt\local\bin

How can I set the PATH variable to check both or is there a better way?

Why does Petite Chez Scheme require no PATH or environment variable settings? That is, when I type petite into the terminal the petite chez scheme interpreter starts automatically.

هل كانت مفيدة؟

المحلول

How can I set the PATH variable to check both?

This is one way, not necessarily the best way

items=(
  /Library/Frameworks/Python.framework/Versions/2.7/bin
  /usr/local/smlnj-110.74/bin
  /opt/local/bin
)
for item in ${items[*]}
do
  PATH=${item}:${PATH}
done
export PATH

Why does Petite Chez Scheme require no PATH or environment variable settings?

Perhaps it installs to a standard location, such as /bin, /usr/bin, /usr/local/bin

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top