V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
simple2025
0D
V2EX  ›  Linux

expect git invalid command

  •  
  •   simple2025 · Aug 30, 2016 · 2044 views
    This topic created in 3527 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
        1
    simple2025  
    OP
       Aug 30, 2016
    这个记录怎么删除的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1043 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:48 · PVG 06:48 · LAX 15:48 · JFK 18:48
    ♥ Do have faith in what you're doing.