The Environment PATH is much larger in PROD as compared to QA:
PATH=.:/home/imc:/home/imc/bin:$HOME:/usr/local/sbin:$PATH
We are using the same setup environment file in PROD and QA but we still find difference.
The longer path means it effects while running the job. So any idea how to improve the PATH?
Make sure both QA and PROD use the same assignment statement for PATH in their
.bashrcand do not reference$PATH. That way you can guarantee the PATHs are identical, no matter what other startup files executed prior to.bashrcare used to modifyPATH. E.g.Note that placing
.in aPATHis a boo-boo for security reasons. On another note, the number of directories inPATHis very likely not impacting speed of scripts. Bash keeps a hash of utility locations and lookup durations are not far from constant time.