Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cygwin';s tr命令;tr-s[:空白:''&引用;,替换小写'的实例;a';在文本文件中_Cygwin_Tr - Fatal编程技术网

Cygwin';s tr命令;tr-s[:空白:''&引用;,替换小写'的实例;a';在文本文件中

Cygwin';s tr命令;tr-s[:空白:''&引用;,替换小写'的实例;a';在文本文件中,cygwin,tr,Cygwin,Tr,在我的Windows系统上,当我使用Cygwin的tr命令从文本文件中删除空白时,如下所示 键入..\item\query.out | tr-s[:blank:''>。\item\a 我发现,除了删除空白外,小写字母“a”的所有实例都已替换为空格 有人知道为什么会这样,以及如何修复它吗 谢谢。键入不是按您的想法执行的命令。改用cat $ type type type is a shell builtin $ type cat cat is /usr/bin/cat $ echo "prova p

在我的Windows系统上,当我使用Cygwin的tr命令从文本文件中删除空白时,如下所示

键入..\item\query.out | tr-s[:blank:''>。\item\a

我发现,除了删除空白外,小写字母“a”的所有实例都已替换为空格

有人知道为什么会这样,以及如何修复它吗


谢谢。

键入
不是按您的想法执行的命令。改用
cat

$ type type
type is a shell builtin
$ type cat
cat is /usr/bin/cat
$ echo "prova prova" > /tmp/test.txt

$ cat /tmp/test.txt
prova prova

$ cat /tmp/test.txt | tr -d [:blank:]
provaprova

我看不到同样的东西,虽然我不能使用
type
,但我使用了:
cat..\item\query.out |tr-s[:blank:''>。\item\a
和所有的a。我无法复制类似的东西。
type..\item\query.out
单独输出什么?