-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append with file redirection not working running linux tools from Windows command line #4400
Comments
Looking at your input it seems like you're running If you want to use the command in CMD escpae out the Or you can use the command in powershell where it will work as expected. I'll close out this issue since I believe it's resolved, if that's not the case please reopen! Thanks for filing. |
Thanks for your response. I still think actually there is an error in WSL interoperability:
I've compiled an EXE with same output as linux echo (to keep end lines):
CMD, as usual, works correctly with append operations via file redirection of Windows executables:
File redirection (appending) does not work when the executable is a linux tool launched with WSL:
Having to escape redirection to avoid normal CMD work breaks interoperatibility between both worlds. |
Thank you for the description, and also thank you to @DHowett-MSFT for taking a look at this issue as well. This does seem to be a WSL problem. I'll reopen the issue. |
@craigloewen-msft The WAR you mentioned before closing the issue for the first time does not seem to be working. Command: Output: |
To me it looks like writing to the file starts at the start of the file, even though I use |
indeed it doesn't seem to truncate the file and replace the content, but indeed starts "appending" from start, the following is in git-bash:
So redirects certainly won't work as expected, and at least a big fat warning should be added to the documentation. |
also split up the gperf commands when generating sw/generated/tokens.cxx wsl has trouble appending using shell redirects, so use separate targets and use cat in the final processing step for tokens.cxx see also microsoft/WSL#4400 Change-Id: Id7a24d060e9be71113ec2827a389d347456f6522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166338 Reviewed-by: Christian Lohmaier <[email protected]> Tested-by: Jenkins
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
also split up the gperf commands when generating sw/generated/tokens.cxx wsl has trouble appending using shell redirects, so use separate targets and use cat in the final processing step for tokens.cxx see also microsoft/WSL#4400 Change-Id: Id7a24d060e9be71113ec2827a389d347456f6522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166338 Reviewed-by: Christian Lohmaier <[email protected]> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174241 Reviewed-by: Balazs Varga <[email protected]> Tested-by: Balazs Varga <[email protected]>
On Windows (version 10.0.18362.267) I'm trying to accumulate in a file results of linux tools, but only last result is stored. Simplifying, this is the problem:
File is always replaced. Append is not working.
The text was updated successfully, but these errors were encountered: