V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
carlosw
V2EX  ›  Linux

关于 echo 管道符的问题

  •  1
     
  •   carlosw · 2019-07-22 17:03:35 +08:00 · 2658 次点击
    这是一个创建于 1732 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我两次执行一样的 echo 内容,但是总有一次会少个 d 字母,这是啥原因?

    # echo  "dis int bri"  | /usr/local/sbin/microcom  -s 9600 /dev/ttyUSB5 -t 1000
    
    <WA4330-ACN>is int bri
                ^
     % Unrecognized command found at '^' position.
    <WA4330-ACN>
    
    
    # echo  "dis int bri"  | /usr/local/sbin/microcom  -s 9600 /dev/ttyUSB5 -t 1000
    dis int bri
    The brief information of interface(s) under route mode:
    Link: ADM - administratively down; Stby - standby
    Protocol: (s) - spoofing
    Interface            Link Protocol Main IP         Description
    NULL0                UP   UP(s)    --
    Vlan1                UP   UP       192.168.1.1
    WLAN-Radio1/0/1      UP   UP       --
    WLAN-Radio1/0/2      UP   UP       --
    WLAN-Radio1/0/3      UP   UP       --
    
    The brief information of interface(s) under bridge mode:
    Link: ADM - administratively down; Stby - standby
    Speed or Duplex: (a)/A - auto; H - half; F - full
    Type: A - access; T - trunk; H - hybrid
    Interface            Link Speed   Duplex Type PVID Description
    GE1/0/1              UP   1G(a)   F(a)   A    1
    GE1/0/2              DOWN auto    A      A    1
    WLAN-BSS11           UP   --      --     A    1
    WLAN-BSS12           UP   --      --     A    1
    WLAN-BSS13           UP   --      --     A    1
    WLAN-BSS14           UP   --      --     A    1
    WLAN-BSS18           UP   --      --     A    1
    WLAN-BSS19           UP   --      --     A    1
    
    2 条回复    2019-07-23 11:41:02 +08:00
    arrow8899
        1
    arrow8899  
       2019-07-23 09:53:20 +08:00
    字符串加个引号试试
    julyclyde
        2
    julyclyde  
       2019-07-23 11:41:02 +08:00
    说实话,还是第一次见到用管道给 minicom 输入内容的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1194 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:17 · PVG 07:17 · LAX 16:17 · JFK 19:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.