技术解析

关于 echo 管道符的问题
0
2021-06-21 09:59:04
idczone

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

# echo  "dis int bri"  | /usr/local/sbin/microcom  -s 9600 /dev/ttyUSB5 -t 1000

is int bri
            ^
 % Unrecognized command found at '^' position.



# 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

字符串加个引号试试

说实话,还是第一次见到用管道给 minicom 输入内容的

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服