[GRASS-dev] [GRASS GIS] #2156: Parser does not honor the dash (-) means stdout convention

GRASS GIS trac at osgeo.org
Mon Jan 6 12:26:00 PST 2014


#2156: Parser does not honor the dash (-) means stdout convention
------------------------------------------+---------------------------------
 Reporter:  wenzeslaus                    |       Owner:  grass-dev@…              
     Type:  defect                        |      Status:  new                      
 Priority:  trivial                       |   Milestone:  7.0.0                    
Component:  Parser                        |     Version:  svn-trunk                
 Keywords:  stdout, r.colors.out, m.proj  |    Platform:  Unspecified              
      Cpu:  Unspecified                   |  
------------------------------------------+---------------------------------

Comment(by wenzeslaus):

 Replying to [comment:1 neteler]:
 > What is the scope of using a hyphen as filename to then try to confuse
 the parser (which
 > fights perhaps with the shell at the same time)?
 >

 Sure, I created the file to simulate the situation on my computer. Using
 `-` fights only with specific programs not shell. It is just a convention
 and different programs uses different command line parsing resulting in
 different behavior in this extreme case. Further reading:

  * http://stackoverflow.com/questions/3797795/does-mean-stdout-in-bash
  * http://unix.stackexchange.com/questions/16357/usage-of-dash-in-place-
 of-a-filename

 > In my experience the probability to find a file with "-" as filename is
 really low.
 > Perhaps not the top priority in the remaining parser issues to be fixed
 :-)
 >
 Sure, it priority is set to trivial (which in this case mean "trivial for
 me to overcome" and not "trivial to fix"). On the other hand, I wouldn't
 close it as wontfix, at least not now.

 > Likely GRASS did not create it, at least not for me while I am also
 using the
 > aforementioned modules.

 Maybe, GUI caused it. I'm almost sure that it was done by GRASS. It
 happened several times at different computers (and the file is always in
 the place where I start GRASS session, so current directory). The main
 reason why I reported this issue is that if you encounter the first non-
 reported issue and then after some time this one, it takes some time to
 understand.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2156#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list