[GRASS-user] module output redirection to file
mseibel at gmail.com
Wed Aug 8 13:15:44 EDT 2007
Oh that's just beautiful. thank you, that did the trick! superb. I hate
to say how much time I spent on this, I should have asked the list right off
On 8/8/07, Jannis Achstetter <krippi at gmail.com> wrote:
> M S schrieb:
> > If i do something like this in the grass terminal:
> > g.version > version
> > i get the grass version in a text file. However, I would like to
> > capture the output from r.lake into a text file and grab the lake
> > geometry parameters. Is there a reason this would not put the
> > terminal output into a file? I get an empty output file, and the
> > module output still goes to the terminal.
> > r.lake dem=surface wl=37 lake=lake37 seed=seedMap > lakeFile
> > as icing on the cake, it would be nice to only grab the lines with the
> > word "Lake" with grep.
> > r.lake dem=surface wl=37 lake=lake37 seed=seedMap | grep Lake >
> > lake37File
> > Something simple perhaps I am overlooking?
> I think, this has nothing to do with overclocking ;)
> It will most likely be that the module puts it's stuff to stderr rather
> than to stdout. With "> file" you redirect stdout to a file but stderr
> will still be printed to your terminal.
> I you want stderr in a file and stdout on the console, use "2> file", if
> you want both stdout and stderr in the file (and nothing on your
> console), use "&> file".
> More about this topic can be found at:
> Jannis Achstetter
> grassuser mailing list
> grassuser at grass.itc.it
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user