###custconfigurations###P_SN=`esxclihardwareplatformget|grep"SerialNumber"|awk-F":"‘{print$NF}‘|sed‘s///g‘`P_NAME=`esxclihardwareplatformget|grep"ProductName"|awk-F":"‘{print$NF}‘`wgethttp://10.10.10.10/config/newserverLOCAL_IPADDR=`catnewserver|grep$P_SN|a..
分类:
系统相关 时间:
2014-10-22 18:29:40
阅读次数:
708
ping测试脚本#!/bin/bash
list=iplist.txt
log=ping.log
echo-n"">$log
#清空历史日志
grep-v"#"$list|grep-v"^$">.list
#从$list文件中读出ip地址列表,去掉包含#的行和空行,结果写入.list
whilereadIP
do
echo"$IP`ping-s1000-f-c100$IP|greptransmitted|awk‘{print$6..
分类:
其他好文 时间:
2014-10-22 18:28:47
阅读次数:
188
1、将INTEGER类型转成日期类型:CreateDate为INTEGER类型INSERT INTO tblTest(AccountId,UserName,CreateDate) VALUES({0},{1},strftime('%s',{2}));转换的时候:select datetime(Cre...
分类:
数据库 时间:
2014-10-22 17:49:54
阅读次数:
206
实验名称:比较tcp和udp的丢包行为试验目的:1. 熟练用ns2做网络仿真试验的整个流程;2. 练习写tcl脚本,了解怎么应用http和rtp;3. 练习用awk处理trace数据,了解怎么计算丢包率;4. 练习用gnuplot绘制曲线图,熟练gnuplot的使用。实验步骤:1。确定网络拓扑。一个...
分类:
其他好文 时间:
2014-10-22 14:15:32
阅读次数:
283
################################################### #!/bin/bash #判断进程是否存在,如果不存在就启动它 PIDS=`ps -ef |grep myprocess |grep -v grep | awk ‘{print $2}‘` if [ "$PIDS" != "" ]; then echo...
分类:
系统相关 时间:
2014-10-21 20:00:40
阅读次数:
288
有如下3种方式:grep -P "\t"awk '/1915848\t/'ctr+c 复制 一个.
分类:
其他好文 时间:
2014-10-21 19:16:45
阅读次数:
120
# Warning! Dangerous step! Destroys VMs for x in $(virsh list --all | grep instance- | awk ‘{print $2}‘) ; do virsh destroy $x ; virsh undefine $x ; done ; # Warning! Dangerous step! Removes lots o...
分类:
其他好文 时间:
2014-10-21 17:57:47
阅读次数:
173
# Auto File Creator for C. # Author:J.Hu # Date: 2014/10/13? #! /usr/bin/python # import file import os import string import time #from time import gmtime,strftime ## Common Header Comment str_he...
分类:
编程语言 时间:
2014-10-21 12:30:49
阅读次数:
412
编写脚本review.sh: #!/bin/bash
VERSION=`svn?log?-v?--stop-on-copy?$1?|?grep?-B4?"svn?copy"?|?head?-1?|?awk?‘{print?substr($1,2)}‘`
svn?di?-r?${VERSION}:head?$1 用法脚本后跟分支...
分类:
其他好文 时间:
2014-10-20 19:44:34
阅读次数:
194
一)、bash shell中expr命令下几种的使用expr在linux中是一个功能非常强大的命令。通过学习做一个小小的总结。1、计算字符串的长度。我们可以用awk中的length(s)进行计算。我们也可以用echo中的echo ${#string}进行计算,当然也可以expr中的expr leng...
分类:
系统相关 时间:
2014-10-20 00:40:57
阅读次数:
341