Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
holinhot
V2EX  ›  Linux

linux cat 查看怎么把绰号删掉了

  •  
  •   holinhot · May 8, 2015 · 3634 views
    This topic created in 4202 days ago, the information mentioned may be changed or developed.

    1.txt
    "mytxt"
    "my22"
    "youweb"

    用 cat 1.txt
    结果显示的是
    mytxt
    my22
    youweb
    怎么绰号没了 怎么让他保留显示

    18 replies  •  2015-05-08 21:13:39 +08:00
    lifanxi
    lifanxi
    May 8, 2015
    1
    这不科学……
    暂时还没想到问题可能出在哪个环节
    est
    est
    May 8, 2015
    2
    which cat
    /bin/cat
    less -nR 试试。
    LazyZhu
    LazyZhu
    May 8, 2015
    3
    # cat 1.txt
    "mytxt"
    "my22"
    "youweb"
    nicai000
    nicai000
    May 8, 2015
    4
    绰号 不是外号的意思么....

    你的Shell搞了什么奇怪的alias或者env吧, 新建一个用户, 进去用/bin/cat试试
    holinhot
    holinhot
    OP
    May 8, 2015
    5
    @lifanxi
    @est
    @LazyZhu
    我搞错了 直接cat是正确的 我用这个他绰号才消失

    cat /tmp/1.txt | xargs -i echo {}
    Csineneo
    Csineneo
    May 8, 2015
    6
    綽號...
    holinhot
    holinhot
    OP
    May 8, 2015
    7
    @nicai000 haha 绰号确实是外号
    holinhot
    holinhot
    OP
    May 8, 2015
    8
    @Csineneo 这是重点嘛
    Csineneo
    Csineneo
    May 8, 2015
    9
    @holinhot 這才是重點,我就是被這個詞吸引進來的 =.=!
    mrco
    mrco
    May 8, 2015
    10
    cat 1.txt|sed 's/\"//g'
    holinhot
    holinhot
    OP
    May 8, 2015
    12
    @LazyZhu 这个是echo我的是从文本读啊
    holinhot
    holinhot
    OP
    May 8, 2015
    13
    @LazyZhu 好像是这个样子cat domain_list.txt | xargs -i echo '"{}"'
    rcmerci
    rcmerci
    May 8, 2015
    14
    绰号??
    lilydjwg
    lilydjwg
    May 8, 2015
    15
    因为这是 xargs 预期的行为:

    This manual page documents the GNU version of xargs. xargs reads items
    from the standard input, delimited by blanks (which can be protected
    with **double or single quotes or a backslash**) or newlines, and executes
    the command (default is /bin/echo) one or more times with any initial-
    arguments followed by items read from standard input. Blank lines on
    the standard input are ignored.
    lilydjwg
    lilydjwg
    May 8, 2015
    16
    PS: 使用 -d 指定分隔符的话,引号和反斜杠就不特殊对待了。
    jasontse
    jasontse
    May 8, 2015 via Android
    17
    这年头有人不认识双引号?
    kchum
    kchum
    May 8, 2015 via iPhone
    18
    我疑惑了“绰号”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4019 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 08:11 · PVG 16:11 · LAX 00:11 · JFK 03:11
    ♥ Do have faith in what you're doing.