MacOS(UNIX): `col` 这个命令的源码在哪?如何找到最新版?

2019-09-05 14:25:09 +08:00
 gIrl1990
NAME
     col -- filter reverse line feeds from input

SYNOPSIS
     col [-bfhpx] [-l num]

DESCRIPTION
     The col utility filters out reverse (and half reverse) line feeds so that the output is in the correct order with only forward and half forward line feeds, and replaces white-space characters with tabs where possible.  This can be useful in processing the output of nroff(1) and tbl(1).

HISTORY
     A col command appeared in Version 6 AT&T UNIX.
1127 次点击
所在节点    问与答
6 条回复
ysc3839
2019-09-05 15:20:25 +08:00
gIrl1990
2019-09-05 16:37:21 +08:00
@ysc3839 `tree -L 2 ~ >tree-2.txt` 会报 `col: Illegal byte sequence` 错误,源码找不到 `Illegal` 字样,233
xml123
2019-09-05 16:45:18 +08:00
直接替换 ascii 小于 32 的字符不行吗
ysc3839
2019-09-05 17:33:59 +08:00
gIrl1990
2019-09-05 19:26:12 +08:00
@xml123 怎么写?😜
gIrl1990
2019-09-05 20:25:50 +08:00
命令没写全,是
`man find | col -b >m-find.txt`
`tree -L 2 ~ | col -b >tree-2.txt`

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/598208

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX