windows - 如何禁用或删除命令后添加的新行 (CRLF)?
问题描述
当我尝试时,"dir"
我得到:
02/13/2020 03:29 PM <DIR> Saved Games
02/13/2020 03:29 PM <DIR> Searches
02/16/2020 12:57 PM <DIR> Videos
1 File(s) 0 bytes
16 Dir(s) 21,887,438,848 bytes free
<<<<<<<this new line is what I want to delete or disable
我尝试了类似的命令,
findstr "." test.txt > output.txt
但它们都在末尾添加了新行。
谢谢
编辑:
我出口"dir /B" to a file > output.txt
我需要这个,因为另一个程序使用该列表,而最后一个新行使其崩溃。
循环遍历该列表的程序是硬编码的,因此我需要为其提供一个没有空行的列表。
解决方案
推荐阅读
- mysql - 我最近从 sqlite3 转移到 SQL。什么应该是正确的 SQL 选项?
- sql - 左连接引发语法错误的 Postgresql 语法
- .net - 使用 .NET 项目的声纳扫描仪命令传递证书
- binary - 如何添加二进制列:1:值 > 2,否则为 0
- php - 如何设置 Laravel 生成具有所需权限的文件
- javascript - AWS POST 到 API Gateway 返回 415“不支持的媒体类型”
- python - 如何使 spaCy 匹配不区分大小写
- dialog - 如何直接在页面上加载触摸 Ui 对话框而不在 aem 中弹出对话框
- javascript - 将类添加到创建的元素
- python - 推理时仅获取 CSV 文件中最后图像的坐标。Python