[GRASS-user] SHELL variable not set

Hamish hamish_b at yahoo.com
Tue Jan 29 05:42:44 EST 2008


Martin Wegmann wrote:
> unfortunately I added 'rm .* ' instead of a 'rm $variable.*' in a
> GRASS script, hence I had to setup a new user account

just to highlight the trap, as I've fallen into it too:

if $variable is unset for some reason, 'rm "$variable".*' becomes
'rm "".*' which is processed by the shell as 'rm .*'

lesson: be very careful with rm, try to anticiapte failure modes, and
set up that rsync cron job to backup your home directory.


Hamish



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the grass-user mailing list