[GRASS-user] shell script stopped worlking

Carlos "Guâno" Grohmann carlos.grohmann at gmail.com
Thu Mar 22 10:35:04 EDT 2007


Thanks Hamish!



On 3/21/07, Hamish <hamish_nospam at yahoo.com> wrote:
> Carlos wrote:
> > my r.roughness script was working fine, but today I tried to use it
> > and get this:
> >
> > (BTW, GRASS 6.3-cvs, Ubuntu Linux 6.10)
> >
> > : 221: ==: unexpected operator
> ..
> > Does this have something to do with the recent changes in parser?
>
> No, changes in Ubuntu. Now it uses [d]ash as the default /bin/sh, not
> Bash, and your script uses Bash specific tricks:
>
>     east=$(echo "scale=6; $west + $grid" | bc);
>
> either make those sh compatible,
>
>     east="`echo "scale=6; $west + $grid" | bc`"
>
> or change the shebang to #!/bin/bash
>
>
>
> Hamish
>


-- 
+-----------------------------------------------------------+
              Carlos Henrique Grohmann - Guano
  Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
Linux User #89721  - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke




More information about the grass-user mailing list