
学习心得记录
lianweizhang
这个作者很懒,什么都没留下…
展开
-
shell脚本学习--函数篇
使用shell脚本,编写模块实现:函数输入与输出、不定定参数使用、 数组在shell脚本中的传入和返回使用。原创 2014-12-23 17:20:20 · 740 阅读 · 0 评论 -
windows下编辑脚本文件在linux下出现错误
问题:使用./shell.sh 出现出现错误:“/bin/sh^M:bad interpreter”使用sh shell.sh 生成的文件会出现"a.txt^M"或者“a.txt?”分析:这里这种情况的出现是因为,脚本是在windows下编写的,然后传到linux上运行,而windows下的断行符是^M$ linux下的断行符是$linux运行的时候无法识别$之前原创 2015-03-18 16:11:20 · 627 阅读 · 0 评论 -
交互工具使用-expect
目標:運行腳本自動匹配用戶信息,自動登陸ssh。條件:ubuntu 10.04安裝expect 與opensshbash腳本(bash.sh)內容:#!/bin/bashecho "hello ,now you will login ssh!"echo "show me the detail info-->原创 2015-03-18 16:10:55 · 412 阅读 · 0 评论