Bright-Computing / bic

Bright-Illumina collaboration
GNU General Public License v2.0
4 stars 5 forks source link

/usr/bin/basename does not exist under rhel6.x (use /bin/basename instead) #39

Closed fgeorgatos closed 7 years ago

fgeorgatos commented 8 years ago

The culprit is clear:

[root@node002 ~]# su - fgeorgatos
-bash: /usr/bin/basename: No such file or directory
[...]
[fgeorgatos@node002 ~]$ ll /usr/bin/basename
ls: cannot access /usr/bin/basename: No such file or directory
[fgeorgatos@node002 ~]$ which basename
/bin/basename
[fgeorgatos@node002 ~]$ grep usr/bin/basename /etc/profile.d -R
/etc/profile.d/z00_lmod.sh:  my_shell=$(/usr/bin/basename $my_shell)

This is the same bug as others have hit: https://www.google.co.uk/search?q=z00_lmod.sh+%2Fusr%2Fbin%2Fps

btw. finding your current shell type is already hard enough in itself... http://stackoverflow.com/questions/3327013/how-to-determine-the-current-shell-im-working-on

fgeorgatos commented 8 years ago

btw. this is no different than https://github.com/TACC/Lmod/issues/118

andy5995 commented 8 years ago

I seem to recall getting the basename of a file without the 'basename' comand was discussed in this thread

fgeorgatos commented 7 years ago

this has been handled by PR #52, closing!