在DOS中使用回声而不拖尾空格 [英] Using echo without trailing space in DOS

查看:77
本文介绍了在DOS中使用回声而不拖尾空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,当我使用echo在DOS中将某些内容打印到文件中时,在字符串后会附加一个空格。我需要打印不带尾部空格的字符串。有没有办法做到这一点,或者作为一种变通办法,从文件中删除尾随空格?

I noticed that when I use echo to print something to a file in DOS, a space is appended to the string. I need to print the string without the trailing space. Is there a way to do that, or as a workaround, remove trailing spaces from the file?

推荐答案

如果我理解此问题,正确地,您写了尾随空格。

If I understood the problem correctly, you wrote the trailing space.

而不是

echo string > file

使用

echo string>file

这篇关于在DOS中使用回声而不拖尾空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆