首页 > 系统相关 >shell编程语言-预交互脚本expect

shell编程语言-预交互脚本expect

时间:2023-03-11 22:33:23浏览次数:40  
标签:ftp shell 编程语言 4.2 send sh expect

 

 

 

 

 

 

-bash-4.2# cat ftp-expect.sh

spawn ftp 192.168.56.1
expect "):"
send "ftp\r"
expect "Password:"
send "123456\r"
expect "ftp>"
send "put ftp-expect.sh\r"
expect "ftp>"
send "quit\r"


-bash-4.2#

 

 

 

 

 

 

 

标签:ftp,shell,编程语言,4.2,send,sh,expect
From: https://www.cnblogs.com/cherishthepresent/p/17207211.html

相关文章

  • shell编程语言-文件的统计与排序
                     ......
  • 使用shell 方式对 vcenter 进行补丁升级
    使用shell方式对vcenter进行补丁升级背景:最近VMware官网发布了最新的VMwarevCenterServer7.0iso补丁文件,为了安全起故此对vCenter进行安全补丁升级。VC版本:vCent......
  • Power Shell脚本检查和修复一些问题
    1.查看.NetFramework版本号:$release=Get-ItemPropertyValue-LiteralPath'HKLM:SOFTWARE\Microsoft\NETFrameworkSetup\NDP\v4\Full'-NameReleaseswitch($re......
  • shell子字符串截取
    http://c.biancheng.net/view/1120.htmlShell截取字符串通常有两种方式:从指定位置开始截取和从指定字符(子字符串)开始截取。从指定位置开始截取这种方式需要两个参数:除......
  • 述:经常用到的文本处理工具(shell编程三剑客)。 awk 命令名称来源
    ​文本格式化工具AWK  AWK:概述:   grep,sed,awk是shell编程中经常用到的文本处理工具(shell编程三剑客)。awk命令名称来源于它的三个开发者Aho、Weinberger和Kern......
  • Shell命令-常用操作2
    Shell命令-常用操作21vim用法:vimfilename说明:用于打开指定的文件三个模式进入文件后,是normal模式normal模式:在此模式下可以通过i进入编辑模式,通过:或/进入命令......
  • Selenium显示等待常用的等待条件ExpectedConditions
       newWebDriverWait(Drivers._driverInstance,newTimeSpan(0,0,2)).Until(ExpectedConditions.InvisibilityOfElementLocated(locator));ExpectedConditions.Inv......
  • Bash shell:bash脚本示例
    示例1:函数、local局部变量的使用1#!/bin/bash2foo1=hello3foo2=world4echo"$foo1"//双引号里的变量转义,输出hello5echo'$foo1'//单引号里的变量不会......
  • Shell总结
    grep-i不区分大小写-c统计包含匹配的行数-n输出行号-v反向匹配-m限制结果数量 &后台执行,关闭会话终端后不再运行nohu......
  • Lecture 2 Shell Tools and Scripting
    ​ Lecture2:ShellToolsandScriptinghomework:1.Readmanlsandwriteanlscommandthatlistsfilesinthefollowingmanner读取manls并编写按以......