码迷,mamicode.com
首页 >  
搜索关键字:bash 脚本选项及组合条件测试    ( 15237个结果
Vi编辑器修改文件.bash_profile可解决backspace出现乱码问题,rlwrap 的安装。
Vi编辑器修改文件.bash_profile可解决backspace出现乱码问题 使用SecureCRT或是pietty_ch连接到一台安装有Oracle DB 10g的RHEL4.2的机器,linux使用的shell是默认的bash。 在bash提示符下,使用Del键或者Backspace键...
分类:其他好文   时间:2014-07-22 23:01:14    阅读次数:344
/bin/bash^M: bad interpreter: 没有那个文件或目录
运行脚本时出现了这样一个错误,打开之后并没有找到所谓的^M,查了之后才知道原来是文件格式的问题,也就是linux和windows之间的不完全兼容。。。具体细节不管,如果验证:vim test.sh:set ff?如果出现fileforma=dos那么就基本可以确定是这个问题了。:set filefo...
分类:其他好文   时间:2014-07-22 23:00:13    阅读次数:243
〖Linux〗gun screen 配置文件
screen 默认使用 bash shell,一般情况下screen只用于android build,tmux则是我的日常使用多终端管理工具。# Default Shellshell "/bin/bash"# show status barhardstatus alwayslastline "%{b...
分类:系统相关   时间:2014-05-03 22:14:57    阅读次数:454
《生活在Linux中》之:prefer function to alias in Bash
在Bash环境中,定义了alias替换有时会产生不是想要的替换:e.g:;而定义function则可以避免这种缺陷。...
分类:系统相关   时间:2014-05-03 15:21:39    阅读次数:319
Linux系统优化脚本
#!/bin/bash#thisscriptisonlyforCentOS6#checktheOSplatform=`uname-i`if[$platform!="x86_64"];thenecho"thisscriptisonlyfor64bitOperatingSystem!"exit1fiecho"theplatformisok"version=`lsb_release-r|awk‘{printsubstr($2,1,1)}‘`if[$version!=6];thenecho"thisscriptiso..
分类:系统相关   时间:2014-05-03 14:51:00    阅读次数:415
2_Shell语言———bash简介
一、初识bashBash是一种解释型语言,但它也提供了交互式接口,支持变量,因此提供了编程环境,所以可以称bash为程序语言。解释型语言属于弱类型语言,其特点为:1.它不强制区分变量类型,即无论存储什么数据,默认均以字符格式(ASCII码)存储。2.不需要事先声明变量,需要时直..
分类:其他好文   时间:2014-05-03 02:09:05    阅读次数:476
rsync inotify
rsync客户端+inotify-tools1.1.1.12rsync服务器1.1.1.111.1.1.12配置[root@slave3wwwroot]#cat/etc/rsyncd-web.sh #!/bin/bash host1=1.1.1.11 src=/web/wwwroot/ dst1=web1 /usr/bin/inotifywait-mrq--timefmt‘%d/%m/%y%H:%M‘--format‘%T%w%f%e‘-emodify,delete,create,attrib..
分类:其他好文   时间:2014-05-03 01:08:22    阅读次数:426
sed
sed‘s/^/\//g‘4行首增加指定字符提取网页中的播放地址:#!/bin/bash printf"enteryourdir:" readdir echo"$dirisxx" cd$dir echo`pwd` forfilein`ls.` do if[-d$file];then echo$file cd$file echo`pwd` tree`pwd`|grepplay|sed‘s/.*//g‘>11 tree`pwd`|grepplay|sed‘s/.*//g..
分类:其他好文   时间:2014-05-03 00:53:15    阅读次数:336
Ubuntu Sublime text 2 安装 SublimeClang
Instructionshereare not great.First shut down ST2.Make sure you use absolute paths for symlink:e.g.$ curl -kL http://xrl.us/pythonbrewinstall | bash$ ...
分类:其他好文   时间:2014-05-02 11:01:23    阅读次数:382
ubuntu中文件夹的作用
/bin系統有很多放置執行檔的目錄,但/bin比較特殊。因為/bin放置的是在單人維護模式下還能夠被操作的指令。 在/bin底下的指令可以被root與一般帳號所使用,主要有:cat, chmod, chown, date, mv, mkdir, cp, bash等等常用的指令。/sbinLinux....
分类:其他好文   时间:2014-05-01 20:38:49    阅读次数:397
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!