[GRASS-user] call a script and see which command is running

Dear R-gurus,

(native wingrass)

I have a script under c:/grass/scripts and I start it invoking
GRASS MSYS Console and calling the script. But
when I do that I can´t see which command are
running. Is there a way of I see the command that
are running?

Best wishes,

miltinho
brazil

On 13/11/08 17:50, Milton Cezar Ribeiro wrote:

Dear R-gurus,

(native wingrass)

I have a script under c:/grass/scripts and I start it invoking GRASS MSYS Console and calling the script. But
when I do that I can´t see which command are running. Is there a way of I see the command that
are running?

Which script language are we speaking about here: bash, R, other ?

Moritz

Hi Moritz,

It is a good question. As I am running Native Wingrass from GRASS MSYS, I believe the it is “bash”.

Regards,

miltinho

2008/11/13 Moritz Lennert <mlennert@club.worldonline.be>

On 13/11/08 17:50, Milton Cezar Ribeiro wrote:

Dear R-gurus,

(native wingrass)

I have a script under c:/grass/scripts and I start it invoking GRASS MSYS Console and calling the script. But
when I do that I can´t see which command are running. Is there a way of I see the command that
are running?

Which script language are we speaking about here: bash, R, other ?

Moritz

You could add some echo lines before each important comand so the
script will print whatever is doing. Something like this:

echo "Erasing all. Goodbye cruel world"
g.mremove rast=*

IMPORTANT: DO NOT EXCECUTE ABOVE LINE (left -f switch off on purpose)

On Thu, Nov 13, 2008 at 3:49 PM, Milton Cezar Ribeiro
<miltinho.astronauta@gmail.com> wrote:

Hi Moritz,
It is a good question. As I am running Native Wingrass from GRASS MSYS, I
believe the it is "bash".
Regards,
miltinho

2008/11/13 Moritz Lennert <mlennert@club.worldonline.be>

On 13/11/08 17:50, Milton Cezar Ribeiro wrote:

Dear R-gurus,

(native wingrass)

I have a script under c:/grass/scripts and I start it invoking GRASS MSYS
Console and calling the script. But
when I do that I can´t see which command are running. Is there a way of I
see the command that
are running?

Which script language are we speaking about here: bash, R, other ?

Moritz

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Milton Cezar Ribeiro wrote:

I have a script under c:/grass/scripts and I start it invoking
GRASS MSYS Console and calling the script. But
when I do that I can´t see which command are
running. Is there a way of I see the command that
are running?

If you add the command "set -x" to the top of the script, bash will
print each command as it executes it.

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