It'd be good if bash did the equivalent of 'hash -p $(which $command) $command' whenever it got a 'file not found' error when using a cached entry, rather than make us do it.
On October 19, 2018 9:39:12 AM PDT, Gary Johnson <[email protected]> wrote: >On 2018-10-19, Saint Michael wrote: >> I installed the latest version, parallel-20180922 >> >> but I keep getting this, in spite of having done the citation >> "Come on: You have run parallel 32 times. Isn't it about time you run >'parallel >> --citation' once to silence the citation notice? " >> Also I am using CentOS Linux release 7.5.1804 (Core), it has a >package called >> moreutils, that has Parallel. But how do I install the latest version >without >> having uninstall moreutils, which has other utilities that I use >often? >> I tried and if I simply compile, make and make install Parallel, I am >still >> using the old version. I had to manually erase the old executable >before typing >> make install. Now I have >> >> parallel --version >> GNU parallel 20180922 >> Copyright (C) 2007-2018 Ole Tange and Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later ><http://gnu.org/licenses/gpl.html> >> This is free software: you are free to change and redistribute it. >> GNU parallel comes with no warranty. >> >> Web site: http://www.gnu.org/software/parallel >> >> When using programs that use GNU Parallel to process data for >publication >> please cite as described in 'parallel --citation'. > >I don't know about the citation issue. Every time I've installed >parallel on a new machine I've just followed those instructions and >the citation warning has disappeared. > >As to the problem of using the latest version: the version >installed by the CentOS package manager should have gone into >/usr/bin, while the version you installed yourself should have gone >into /usr/local/bin. Your PATH should have /usr/local/bin before >/usr/bin, so executing just "parallel" should get you your version >in /usr/local/bin. However, bash, and possibly other shells, caches >the location of executables that it runs so that it doesn't have to >search the PATH each time. Your shell had probably cached the >location of parallel as /usr/bin/parallel before you installed the >new version, so it continued to execute the old version. To fix >that in the future, just execute "hash -r", which clears that cache. > >Regards, >Gary -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
