Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
simple2025
0D
V2EX  ›  Linux

expect git invalid command

  •  
  •   simple2025 · Aug 30, 2016 · 2362 views
    This topic created in 3718 days ago, the information mentioned may be changed or developed.

    expect 脚本

    #!/usr/bin/expect -f
    puts "pwd [pwd]"
    git status
    
    expect "$ " {
        send $expect_out(0,string)
    }
    

    开启 debug 运行结果:

    expect version 5.45
    argv[0] = expect  argv[1] = -d  argv[2] = /home/cqh/Nutstore/excode/ch5/get_branch.exp  
    set argc 0
    set argv0 "/home/cqh/Nutstore/excode/ch5/get_branch.exp"
    set argv ""
    executing commands from command file /home/cqh/Nutstore/excode/ch5/get_branch.exp
    pwd /data/youmicode/wind
    invalid command name "git"
        while executing
    "git status"
        (file "/home/cqh/Nutstore/excode/ch5/get_branch.exp" line 3)
    
    

    这种问题怎么解决啊,把git status替换成spawn git status 也不行

    simple2025
    simple2025
    OP
    Aug 30, 2016
    1
    这个记录怎么删除的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1310 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 87ms · UTC 21:08 · PVG 05:08 · LAX 13:08 · JFK 16:08
    ♥ Do have faith in what you're doing.