转换说明及作为结果的打印输出%a浮点数、十六进制数字和p-记数法(C99)%A 浮点数、十六进制数字和p-记法(C99)%c 一个字符 %d 有符号十进制整数 %e 浮点数、e-记数法%E 浮点数、E-记数法%f 浮点数、十进制记数法 %g 根据数值不同自...
分类:
编程语言 时间:
2014-10-22 21:54:17
阅读次数:
200
查找文件名称为test的文件并输入文件存在的路径/ 为绝对路径 .为相对路径find / -name test -print带测试的find命令1 find . -newer test -print在当前目录下查找比test 文件新的文件联合查找,在当前目录下查找以下划线开头的文件或者是比test文...
分类:
系统相关 时间:
2014-10-22 21:52:35
阅读次数:
263
summary: 1: puts "s in #{user_input}" 和puts 's in #{user_input}'不同,前者#{user_input}会输出user_input的值,后者只是输出鸳原样,s in #{user_input} 1 print "Thtring, pl...
分类:
其他好文 时间:
2014-10-22 21:52:30
阅读次数:
140
question: 1: chomp是? 2: first_name.capitalize!后面的感叹号有什么作用? 3: #{first_name} 1 print "What's your first name?" 2 first_name = gets.chomp 3 first_nam...
分类:
其他好文 时间:
2014-10-22 21:38:03
阅读次数:
224
Linux常用命令英文全称与中文解释Linux系统man: Manual 意思是手册,可以用这个命令查询其他命令的用法。pwd:Print working directory 意思是密码。su:Swith user 切换用户,切换到root用户cd:Change directory 切换目录ls:L...
分类:
系统相关 时间:
2014-10-22 20:23:13
阅读次数:
353
###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
例一:#include int main(){int a=100,b=200;int *p1=&a,*p2=&b;printf("%d,%d\n",a,b); printf("%x,%x\n",&a,&b); printf("%x,%x\n",p1,p2); //虽然上面 *p1=&a ,那也就是 ...
分类:
编程语言 时间:
2014-10-22 17:46:00
阅读次数:
224
x = "There are %d types of people." % 10binary = "binary"do_not = "don't"y = "Those who know %s and those who %s." % (binary, do_not)print xprint ypri...
分类:
其他好文 时间:
2014-10-22 14:22:51
阅读次数:
122
Following code explain how 'global' works in the distinction of global variable and local variable. 1 var = 'Global Variable' 2 print(var) 3 4 def fu....
分类:
编程语言 时间:
2014-10-22 12:37:34
阅读次数:
161