[GRASS5] strange things on cmd line

Hi,

today I found something unusual (maybe my error?):

GRASS:~ > s.surf.rst in=elev30.sites elev=elev.15m ten=30 smooth=1.0
slope=slope.15m aspect=aspect.15m

100%
Percent complete: history initiated
GRASS:~ > g.list rast map=user1
----------------------------------------------
raster files available in mapset user1:
aspect.15m elev.15m flowacc.30m lsfactor.30m slope.30m
aspect.30m flowacc.15m gs13.clump slope.15m

----------------------------------------------

But:

g.remove aspect.15m,slope.15m
s.surf.rst in=elev30.sites elev=elev.15m ten=30 smooth=1.0\
              slope=slope.15m aspect=aspect.15m
GRASS:~ >g.list rast map=user1
----------------------------------------------
raster files available in mapset user1:
aspect.30m flowacc.15m gs13.clump slope.30m
elev.15m flowacc.30m lsfactor.30m

----------------------------------------------

Oops. The slope=slope.15m and aspect=aspect.15m are ignored!!

I had the experience, that breaking long lines as done above
is o.k. in GRASS.

Clueless,

Markus

On Wednesday 06 February 2002 15:31, Markus Neteler wrote:

Hi,

today I found something unusual (maybe my error?):

Command line continuation (are not) should be determined by your shell, not
by GRASS. If it is a problem, then would it be GRASS's problem or a problem
with the shell?

Roger Miller

On Wed, Feb 06, 2002 at 05:39:43PM -0700, Roger Miller wrote:

On Wednesday 06 February 2002 15:31, Markus Neteler wrote:

> Hi,
>
> today I found something unusual (maybe my error?):

Command line continuation (are not) should be determined by your shell, not
by GRASS. If it is a problem, then would it be GRASS's problem or a problem
with the shell?

I have been using "\" successfully with other commands in GRASS (in bash).
Only s.surf.rst fails. Probably a parsing problem in that module?

Markus

On Thu, Feb 07, 2002 at 09:56:57AM +0100, Markus Neteler wrote:

On Wed, Feb 06, 2002 at 05:39:43PM -0700, Roger Miller wrote:
> On Wednesday 06 February 2002 15:31, Markus Neteler wrote:
>
> > Hi,
> >
> > today I found something unusual (maybe my error?):
>
> Command line continuation (are not) should be determined by your
> shell, not by GRASS. If it is a problem, then would it be
> GRASS's problem or a problem with the shell?

I have been using "\" successfully with other commands in GRASS (in bash).
Only s.surf.rst fails. Probably a parsing problem in that module?

If shell continuation works, the program will see exactly the same
as with a long line. Make sure you do not have anything on the line
after the backslash.

There might be a problem with parsing spaces and tabs in the module
if the above does not solve the problem.

For illustration see the following tests:

$ echo $BASH_VERSION
2.03.0(1)-release

$ echo bla bla bla | od -tcx
0000000 b l a b l a b l a \n
        20616c62 20616c62 0a616c62
0000014

bernhard@abnoba:~$ echo bla bla\

bla | od -tcx

0000000 b l a b l a b l a \n
        20616c62 20616c62 0a616c62
0000014
bernhard@abnoba:~$ echo bla bla \

bla | od -tcx

0000000 b l a b l a b l a \n
        20616c62 20616c62 0a616c62
0000014

  Bernhard

--
Professional Service for Free Software (intevation.net)
The FreeGIS Project (freegis.org)
Association for a Free Informational Infrastructure (ffii.org)
FSF Europe (fsfeurope.org)

Thanks to all who helped with my s.surf.rst problem.

I fact there was a "blank" after \, now it's running well.

Markus

On Thu, Feb 07, 2002 at 12:52:49PM +0100, Bernhard Reiter wrote:

On Thu, Feb 07, 2002 at 09:56:57AM +0100, Markus Neteler wrote:
> On Wed, Feb 06, 2002 at 05:39:43PM -0700, Roger Miller wrote:
> > On Wednesday 06 February 2002 15:31, Markus Neteler wrote:
> >
> > > Hi,
> > >
> > > today I found something unusual (maybe my error?):
> >
> > Command line continuation (are not) should be determined by your
> > shell, not by GRASS. If it is a problem, then would it be
> > GRASS's problem or a problem with the shell?
>
> I have been using "\" successfully with other commands in GRASS (in bash).
> Only s.surf.rst fails. Probably a parsing problem in that module?

If shell continuation works, the program will see exactly the same
as with a long line. Make sure you do not have anything on the line
after the backslash.

There might be a problem with parsing spaces and tabs in the module
if the above does not solve the problem.

For illustration see the following tests:

$ echo $BASH_VERSION
2.03.0(1)-release

$ echo bla bla bla | od -tcx
0000000 b l a b l a b l a \n
        20616c62 20616c62 0a616c62
0000014

bernhard@abnoba:~$ echo bla bla\
> bla | od -tcx
0000000 b l a b l a b l a \n
        20616c62 20616c62 0a616c62
0000014
bernhard@abnoba:~$ echo bla bla \
> bla | od -tcx
0000000 b l a b l a b l a \n
        20616c62 20616c62 0a616c62
0000014

  Bernhard

--
Professional Service for Free Software (intevation.net)
The FreeGIS Project (freegis.org)
Association for a Free Informational Infrastructure (ffii.org)
FSF Europe (fsfeurope.org)