Questions tagged «tr»

9
如何将多行输出连接到一行?
如果运行命令cat file | grep pattern,则会得到多行输出。您如何将所有行连接成一行,有效地将每一行替换"\n"为"\" "("以空格结尾)? cat file | grep pattern | xargs sed s/\n/ /g 对我不起作用。
157 linux  bash  unix  grep  tr 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.