austgl / python-markdown2

Automatically exported from code.google.com/p/python-markdown2
Other
0 stars 0 forks source link

`markdown2 some-path > some-path` screws up, wipes out file #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Redirecting generated output to the same path as the input *wipes out* the 
input. Bad bad.

Original issue reported on code.google.com by tre...@gmail.com on 30 Aug 2010 at 11:24

GoogleCodeExporter commented 9 years ago
As far as I am aware, this is common behavior for just about any application; 
using sed in a similar pattern will also result in trashing the input file.

Original comment by whitel...@gmail.com on 10 Jun 2011 at 2:57

GoogleCodeExporter commented 9 years ago
This isn't a bug in markdown2. The shell processes redirections before the 
given program even runs, so the shell truncates the file before markdown2 has a 
chance to open it.

Original comment by agrif...@gmail.com on 26 Apr 2012 at 1:02

GoogleCodeExporter commented 9 years ago
closing, then. Thanks for the comments.

Original comment by tre...@gmail.com on 26 Apr 2012 at 7:25