Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1207297
  • 博文数量: 49
  • 博客积分: 10237
  • 博客等级: 上将
  • 技术积分: 2764
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-02 16:19
个人简介

满随天外云卷云舒 静观庭前花开花落

文章分类

全部博文(49)

文章存档

2013年(18)

2012年(9)

2011年(1)

2010年(5)

2009年(3)

2008年(13)

分类: LINUX

2013-06-07 17:06:46

sudo apt-get install expect  
expect $filename.sh  

filename.sh
#!/usr/bin/expect -f
spawn ~/work/selectdata/run.sh  
expect "please input the filename of the file which listed current directory filename"  
send -- "dat.txt\n"
expect "please input the listfilename include extension"  
send -- "dat.txt\n" 
expect "please input the resultfilename include extension" 
send -- "result.txt\n"
expect "please input the filename of the file which contain the filename of need to be selected" 
send -- "selected.txt\n" 
expect "please input the foldername which you want to create and would used as the storage for the selected file" 
send -- "selecteddata\n" 
interact 
阅读(1160) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~