码迷,mamicode.com
首页 >  
搜索关键字:awk ping echo    ( 24629个结果
嵌入式linux下自动定时检测硬盘空间并删除旧文件脚本
#! /bin/sh while true; do i=`df -h | egrep '/mnt/D'| awk '{print $5}' | cut -d "%" -f1 -` if [ "$i" -ge 90 ] then echo "disk nearly full" cd /mnt/D/files/ for file1day in `ls -d */ | sort -n...
分类:系统相关   时间:2014-09-21 00:00:59    阅读次数:276
NFS 共享和DNS配置的 AWK使用
检查是否nfs#rpm -qa|grep nfs#rpm -qa|grep rpcbind将nfs rpcbind 设置为开机启动#chkconfig nfs on#chkconfig rpcbind on#启动 nfs rpcbinds#service rpcbind start#service....
分类:其他好文   时间:2014-09-20 23:48:59    阅读次数:417
第十三章、学习 Shell Scripts 条件判断式
利用 if .... then单层、简单条件判断式if [ 条件判断式 ]; then 当条件判断式成立时,可以进行的命令工作内容;fi {$0 someword}"else echo "The only parameter is 'hello', ex> {$0 hello}"finetst...
分类:其他好文   时间:2014-09-20 18:00:29    阅读次数:262
PHP生成word的方法(解决乱码问题)
';}function save($path){ echo "";$data = ob_get_contents();ob_end_clean(); $this->wirtefile ($path,$data);} function wirtefile ($fn,$data){$fp=fopen($...
分类:Web程序   时间:2014-09-20 14:03:37    阅读次数:267
php 前一天或后一天的日期
代码如下"; echo "今天:",date("Y-m-d",strtotime("18 june 2008")),""; echo "昨天:",date("Y-m-d",strtotime("-1 day")), ""; echo "明天:",date("Y-m-d",st...
分类:Web程序   时间:2014-09-20 08:49:46    阅读次数:285
关于zbp的一些修改的总结.
//循环分类ID,供首页调用. function dump($var, $echo=true, $label=null, $strict=true) { $label = ($label === null) ? '' : rtrim($label) . ' '; if (!$strict) { if...
分类:其他好文   时间:2014-09-19 23:47:06    阅读次数:351
awk 替换练习题
练习题:http://blog.chinaunix.net/uid-10540984-id-3086644.htmlcat file:a b c a d as d d d x s ah j s a s h j hj d f j a s j k j要求:删除行内与第一列字符重复的字符,shell、se...
分类:其他好文   时间:2014-09-19 23:42:36    阅读次数:210
2014-09-19学习与整理
1.写一个脚本,实现判断192.168.1.0/24网络里,当前在线的IP有哪些,能ping通则认为在线。#/bin/bash #Thisprogremistouchpcliveordie #Auther:XunGE ##################################################################### FL=/root/IP.txt read-p"请输入你要测试主机的前3..
分类:其他好文   时间:2014-09-19 19:44:56    阅读次数:218
if 判断两个数值大小--多分支if语句实现对参数的严格判断
if判断两个数值大小--多分支if语句实现对参数的严格判断#!/bin/bashprint_usage(){printf"你输入的参数个数不对或者有误,请按照下面语法执行:\n"echo-e"$0数字1数字2"exit1}if[$#-ne2]thenprint_usageexit1fi[-n"`echo$1|sed‘s/[0-9]//g‘`"-a-n"`echo$2|sed‘s/[0-9]//g‘`"]&..
分类:其他好文   时间:2014-09-19 19:33:56    阅读次数:228
自动监控主从MySQL同步的SHELL脚本
代码如下:#!/bin/bash#check MySQL_Slave Status#crontab time 00:10MYSQLPORT=`netstat -na|grep "LISTEN"|grep "3306"|awk -F[:" "]+ '{print $4}'`MYSQLIP=`ifcon...
分类:数据库   时间:2014-09-19 19:15:35    阅读次数:303
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!