[GRASS5] Re: sqlite browser

Hamish hamish_nospam at yahoo.com
Sun Nov 13 20:54:35 EST 2005


> See also point 22 in SUBMITTING: 
> http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/SUBMITTING
> 
> 22. If you write a shell script and search for a command in $PATH, do 
> NOT use the "which" command or the "type -p" command. Both commands
> are  not supported on all platforms, thus causing problems for some
> people.

Out of curiosity, which platforms is this a problem on?
Only really old stuff?

>  As an alternative, please use code similar to the following
> shell script snippet which will perform the same function. In this
> case, the path of the grass60 command is saved if grass60 is found in
> $PATH. This won't recognize aliased command name.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is a problem on Debian.

e.g.

$ which wish
/usr/bin/wish

$ ls -l /usr/bin/wish
lrwxrwxrwx  1 root root 22 Feb 18  2005 /usr/bin/wish -> /etc/alternatives/wish*

$ ls -l /etc/alternatives/wish
lrwxrwxrwx  1 root root 16 Feb 18  2005 /etc/alternatives/wish -> /usr/bin/wish8.4*

$ ls -1 /usr/bin/ | grep '@' | wc -l
269



Hamish




More information about the grass-dev mailing list