码迷,mamicode.com
首页 >  
搜索关键字:bash shell    ( 38571个结果)
-bash: crontab: command not found(转)
操作步骤1.确认crontab是否安装:执行crontab命令如果报commandnotfound,就表明没有安装2.安装crontab执行yuminstall-yvixie-cron3.确认是否安装成功:执行crontab-l4.看是否设置了开机自动启动chkconfig--listcrond5....
分类:其他好文   时间:2014-09-28 21:27:15    阅读次数:115
Shell编程入门(第二版)(上)
简单的示例Shell程序示例1.#!/bin/bash #This is to show what a shell script looks like echo "Our first example" echo # This inserts an empty line in output. echo "We are currently in the following directory." /b...
分类:其他好文   时间:2014-09-28 20:05:46    阅读次数:266
Linux Shell文件差集
file1-file2 => file3file1=/data/aaafile2=/data/bbbfile3=/data/cccsort -m $file3
分类:系统相关   时间:2014-09-28 19:54:45    阅读次数:179
debian下使用shell脚本时出现了 declare:not found 解决方法
问题:出现declare:not found的提示解决:原来,UBUNTU用的是dash(后来证明这个其实这个不是错误的原因:从#!/bin/bash到#!/bin/dash,依旧无法运行,在这写出这一点只为引起以后的注意)只需要用sudo dpkg-reconfigure dash指令然后在出现的...
分类:其他好文   时间:2014-09-28 19:48:35    阅读次数:181
shell中如何取括号中的字符
1. 使用grep(结果带括号,不知道有没有办法仅把括号中的内容匹配出来)$a='abc[edg]adfirpqu'$echo $a|grep -o '\[.*\]' #中括号的处理需要转义[edg]$b='abc(edg)adfirpqu'$echo $b|grep -o '(.*)'(edg)....
分类:其他好文   时间:2014-09-28 19:40:35    阅读次数:209
Pig 在 Shell中使用,批量加载处理文件
Pig 在 Shell中使用,批量加载处理文件...
分类:其他好文   时间:2014-09-28 19:16:54    阅读次数:167
shell中$0,$?,$!等的特殊用法
变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出所有参数。 $@ 所有参数列表。如"$@"用「"」括起来的情况、以"$1" "$2"...
分类:其他好文   时间:2014-09-28 19:16:34    阅读次数:168
高危bash漏洞来袭,小心你的服务器!
高危bash漏洞来袭,小心你的服务器!背景:北京时间9月25日消息,Linux用户今天又得到了一个“惊喜”!RedHat安全团队在Linux中广泛使用的Bashshell中发现了一个隐晦而危险的安全漏洞。该漏洞被称为“BashBug”或“Shellshock”。当用户正常访问,该漏洞允许攻击者的代码像在Sh..
分类:其他好文   时间:2014-09-28 19:00:05    阅读次数:229
shell 自动登录脚本
#!/bin/bash IP=`awk‘{print$1}‘/home/bash/mima.txt` foriin$IP do {port=`grep$i/home/bash/mima.txt|awk‘{print$2}‘` pawd=`grep$i/home/bash/mima.txt|awk‘{print$3}‘` expect<<EOF spawnssh-p$portroot@$i; expect{ "(yes/no)?"{send"yes\r"} "password:"{send"$pa..
分类:其他好文   时间:2014-09-28 18:43:36    阅读次数:133
debian init
1 bash_completion默认是没有bash 自动补齐的,比如apt-get install 后面是不会自动补齐的,这个在ubuntu里面是有的,debian 里面默认没有开启开启方法是vim ~/.bashrc. /etc/bash_completionsource ~/.bashrc2 ...
分类:其他好文   时间:2014-09-28 17:22:23    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!