On 28.04.2013 23:11, Seb wrote:
> On Sun, 28 Apr 2013 16:57:01 -0400,
> "Chris F.A. Johnson" <
cfajo...@gmail.com> wrote:
>
>> On 2013-04-28, Seb wrote:
>>> Hi,
>
>>> I recently got bitten by the change from bash to dash as the default
>>> /bin/sh in Debian. While bash was the default, the following ran
>>> fine (shebang in the script is "#! /bin/sh"):
>
>>> local projstr=$(${GMT} grdinfo "${raster_prefix}.grd" | \ awk
>>> '/Remark: / {sub(/.+Remark: /, ""); sub(/; .+/, ""); print}')
>
>>> Now that /bin/sh points to dash as the interpreter, the above prints
>>> an error:
>
>>> ./script.sh: 10: ./script.sh: +ellps: bad variable name
>
>>> where "+ellps" is part of the string passed to awk in the pipe. So
>>> this seems to be a quoting issue, and I can't see anything in the
>>> docs that would clarify what it is. Any advice?
>
>> What does $GMT contain? What is the output of grdinfo?
>
> GMT is a collection of programs for handling geographic and cartesian
> data sets. ${GMT} is a variable that identifies which version of the
> program following it should be called.