[GRASS-dev] Re: [GRASS-SVN] r30420 - grass/trunk/scripts/v.db.renamecol

Glynn Clements glynn at gclements.plus.com
Wed Mar 12 00:14:25 EDT 2008


Ivan Shmakov wrote:

>  >> On Ubuntu Gutsy it's like Ivan says - echo "!" is ok in scripts,
>  >> fails on command line.
> 
>  >> I'm about to switch to Debian. I'll check this if not forget to.
> 
>  > It could very well be user error & bad memory on my behalf.
> 
> 	It's probably so.  It seems that `!' cannot be granted its
> 	special meaning within the non-interactive Bash (even with
> 	explicit `set -H'.)
> 
>  > But regardless it can only be a good thing to '' quote !s.
> 
> 	I guess there're enough scripts with unquoted `!' outside of
> 	GRASS,

Definitely.

"if [ ! ... ] ..." is very common, and I've never seen the ! quoted.

Note that autoconf-generated configure scripts use "if test ! ..." 
quite extensively, so if your shell had a problem with that, you
wouldn't get very far.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list