Opened 5 years ago

Closed 5 years ago

#3989 closed enhancement (worksforme)

v.to.db -p adds spurious blank line to beginning of output

Reported by: jidanni Owned by: grass-dev@…
Priority: trivial Milestone: 7.8.3
Component: Database Version: git-releasebranch78
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

v.to.db -p adds this leading blank line to output,

$ grass /home/jidanni/grassdata/ruanbikeng/TC46 --exec v.to.db -p map=Qingfu_st option=length type=line units=k
Starting GRASS GIS...
Cleaning up temporary files...
Executing <v.to.db -p map=Qingfu_st option=length type=line units=k> ...
Reading features...

cat|length
1|0.157112134436172

Change History (4)

comment:1 by neteler, 5 years ago

Milestone: 7.8.3

comment:2 by neteler, 5 years ago

I have made a test:

grass78 ~/grassdata/nc_spm_08/user1 --exec v.to.db -p soils_wake option=area type=boundary units=h
Starting GRASS GIS...
Cleaning up temporary files...
Executing <v.to.db -p soils_wake option=area type=boundary units=h> ...
Reading areas...
 100%
cat|area
1|318.734799672501
2|226.872452220522
3|73.0605252499888
4|1264.63116952867
5|39.5349875861163
6|42.0685080402503
7|158.071142303578
8|30.1772676448377
9|40.3409691012583
[...]
Execution of <v.to.db -p soils_wake option=area type=boundary units=h> finished.
Cleaning up default sqlite database ...
Cleaning up temporary files...

Apparently the percentage output of progress is not shown on your system.

Did you set the variable GRASS_MESSAGE_FORMAT to anything specific?

comment:3 by jidanni, 5 years ago

I can't test for the next few months. All I remember is that I used an emacs shell window, or M-x compile. So many of interactive things that depend on terminals and CR LF stuff will look different.

comment:4 by neteler, 5 years ago

Resolution: worksforme
Status: newclosed

As per https://grass.osgeo.org/grass78/manuals/variables.html, you can set for your case

GRASS_MESSAGE_FORMAT=plain - sets percentage output and message formatting style to ASCII output without rewinding control characters.

I'll close for now, feel free to reopen as needed with more tests.

Note: See TracTickets for help on using tickets.