V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
chenqh
V2EX  ›  Linux

expect git invalid command

  •  
  •   chenqh · 2016-08-30 11:37:34 +08:00 · 1637 次点击
    这是一个创建于 2800 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 也不行

    chenqh
        1
    chenqh  
    OP
       2016-08-30 11:44:20 +08:00
    这个记录怎么删除的?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3180 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:30 · PVG 18:30 · LAX 03:30 · JFK 06:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.