Project

General

Profile

Actions

Bug #9944

closed

in ruby for windows in "system" a redirection to append a file works incorrectly

Added by bdimych (Dmitry Bolshakov) over 10 years ago. Updated over 1 year ago.

Status:
Rejected
Assignee:
Target version:
-
ruby -v:
ruby 2.0.0p481 (2014-05-08) [i386-mingw32]
[ruby-core:63169]

Description

c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>C:\Ruby200\bin\ruby.exe -v
ruby 2.0.0p481 (2014-05-08) [i386-mingw32]

c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>( echo first line & echo second line & echo third line ) > test.txt

c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>type test.txt
first line
second line
third line

c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>C:\Ruby200\bin\ruby.exe -e "system 'cmd', '/c', 'echo', 'blabla', :out => ['test.txt', 'a']"

c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>type test.txt
blabla
ne
second line
third line

c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>
c:\Users\bdimych>

ruby writes "blabla" in the beginning instead of appending

windows 7 64

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0