A
ar0
Jungspund
Moin,
ich sitz in einem System auf dem ich einige Programme die im PATH sind durch selbst kompilierte (lokal im Homeordner vorhandene) aktuellere Versionen ersetzen will.
Ich hab naiv einfach mal
in meine ~/.bashrc gepackt. Ist das "sauber"? (Oder könnte er irgendwann mal rummeckern, dass beispielsweise 2 verschiedene Versionen von vim im PATH enthalten sind oder ähnliches?)
Ich mein, es funktioniert so wie ich es will, ("which foo" gibt mir die Version in meinem ~/bin an falls vorhanden, trotz weiterer binaries in anderen PATH Pfaden.) aber ich bin mir nicht wirklich sicher ob das koscher ist.
Relevanter Teil der Bash Manpage:
ich sitz in einem System auf dem ich einige Programme die im PATH sind durch selbst kompilierte (lokal im Homeordner vorhandene) aktuellere Versionen ersetzen will.
Ich hab naiv einfach mal
Code:
export PATH=~/bin:"$PATH"
Ich mein, es funktioniert so wie ich es will, ("which foo" gibt mir die Version in meinem ~/bin an falls vorhanden, trotz weiterer binaries in anderen PATH Pfaden.) aber ich bin mir nicht wirklich sicher ob das koscher ist.
Relevanter Teil der Bash Manpage:
Code:
COMMAND EXECUTION
[...]
If the name is neither a shell function nor a builtin, and contains no slashes, bash searches each element of the
PATH for a directory containing an executable file by that name. Bash uses a hash table to remember the full
pathnames of executable files (see hash under SHELL BUILTIN COMMANDS below). A full search of the directories in
PATH is performed only if the command is not found in the hash table. If the search is unsuccessful, the shell
prints an error message and returns an exit status of 127.
Code:
$ bash --version
GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.