关于 echo 管道符的问题

2019-07-22 17:03:35 +08:00
 carlosw

我两次执行一样的 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
2662 次点击
所在节点    Linux
2 条回复
arrow8899
2019-07-23 09:53:20 +08:00
字符串加个引号试试
julyclyde
2019-07-23 11:41:02 +08:00
说实话,还是第一次见到用管道给 minicom 输入内容的

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

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

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

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

© 2021 V2EX