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

请问这段 shell 语句为何变量被回车符号拆分了

  •  
  •   ilotuo · Feb 24, 2023 via Android · 572 views
    This topic created in 1168 days ago, the information mentioned may be changed or developed.
    ➜ cmd export device='-s DEKFVG6D658PU4NR '                                               [11:09:22]                                                            
    ➜ cmd pid=$(adb "${device}" shell ls)                                                   [11:10:31]
    adb: -s requires an argument



    如题,ab 执行失败。ddevice 变量中间-s 后面变成回车了。
    感谢大佬们。。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1003 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 18:44 · PVG 02:44 · LAX 11:44 · JFK 14:44
    ♥ Do have faith in what you're doing.