V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
gIrl1990
V2EX  ›  问与答

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

  •  
  •   gIrl1990 · Sep 5, 2019 · 1524 views
    This topic created in 2438 days ago, the information mentioned may be changed or developed.
    • 就重定向到文件的时候,有些内容带 控制字符 , col 就可以移除掉,我不知道对不对网上看来的,有其它好方法求赐教,比如 man find >m-find.txt 或者 `tree -L 1 >tree-1.txt
    • col 这个命令的源码在哪?如何找到最新版?
    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.
    
    Supplement 1  ·  Sep 5, 2019
    Supplement 2  ·  Sep 6, 2019

    Fixed: tree -NL 2 ~ >tree-2.txt

    man 的话,暂不知道,你比如说从 https://github.com/man-pages-zh/manpages-zh 随便找一个带中文的。macos man 查看失败。

    6 replies    2019-09-05 20:25:50 +08:00
    gIrl1990
        2
    gIrl1990  
    OP
       Sep 5, 2019
    @ysc3839 `tree -L 2 ~ >tree-2.txt` 会报 `col: Illegal byte sequence` 错误,源码找不到 `Illegal` 字样,233
    xml123
        3
    xml123  
       Sep 5, 2019
    直接替换 ascii 小于 32 的字符不行吗
    ysc3839
        4
    ysc3839  
       Sep 5, 2019
    gIrl1990
        5
    gIrl1990  
    OP
       Sep 5, 2019
    @xml123 怎么写?😜
    gIrl1990
        6
    gIrl1990  
    OP
       Sep 5, 2019
    命令没写全,是
    `man find | col -b >m-find.txt`
    `tree -L 2 ~ | col -b >tree-2.txt`
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1557 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 16:49 · PVG 00:49 · LAX 09:49 · JFK 12:49
    ♥ Do have faith in what you're doing.