ilotuo
V2EX  ›  问与答

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

  •  
  •   ilotuo · Feb 24, 2023 via Android · 692 views
    This topic created in 1222 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   ·   1180 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 18:00 · PVG 02:00 · LAX 11:00 · JFK 14:00
    ♥ Do have faith in what you're doing.