#!/bin/bashforiin$(seq19) do foryin$(seq1$i) do echo-ne"$i*$y=$(($i*$y))\t" done echo done
分类:
其他好文 时间:
2015-01-20 18:32:10
阅读次数:
155
shell实现关联数组shell实现关联数组用 shell 编写数组的输入输出;有一个文件,第一列存主机名,第二列为 IP 地址,如何输入主机名返回 IP 地址,shell 编写实现;while read host ip; do eval ${host}=${ip}done# 这样就可以直接 ech...
分类:
编程语言 时间:
2015-01-20 13:45:45
阅读次数:
189
The sanlock daemon manages leases for applications running on a cluster of hosts with shared storage. All lease management and coordination is done
through reading and writing blocks on the shared storage. Two types of leases are used, each based...
分类:
其他好文 时间:
2015-01-20 10:34:42
阅读次数:
214
passwdInput.returnKeyType = .NextdomainInput.returnKeyType = .Done//在willappear中获取事件self.passwdInput.addTarget(self, action: "nextKey:", forControlEve...
分类:
其他好文 时间:
2015-01-19 10:37:30
阅读次数:
222
1 登录强制修改密码
[root@node24 ~]# cat /etc/passwd | tail -31 | awk -F":" '{print $1}' >> user
[root@node24 ~]# for i in `cat user`;do chage -d 0 $i ;done
2 设置密码复杂度
[root@node24 ~]# cat /e...
分类:
其他好文 时间:
2015-01-18 22:43:51
阅读次数:
228
×Well done! 为了探究webqq的http请求流程和数据交互,我付出了很多心血。写下这篇文章!!!这是我逝去的青春系列写完之后我会把源码打包奉上~------我的征途是星辰大海一、 进入webqq页面二、 检查是否需要验证码对这个页面先get一次,保存下cookie在用户输入完QQ号之后,...
分类:
Web程序 时间:
2015-01-18 00:55:50
阅读次数:
263
#!/bin/bash
#北京Linux技术交流群:76109360
n=0
s=0
for((i=1;i<=10;i++))
do
ifping-c1-W1192.168.1.$i>/dev/null;then
echo-e"\033[31m192.168.1.$iyes\033[0m"
letn=$n+1
else
echo-e"\033[32m192.168.1.$ino\033[0m"
lets=$s+1
fi
done
echo"$nyes,$sno"注:ping参..
分类:
系统相关 时间:
2015-01-17 19:38:40
阅读次数:
231
shell实现关联数组shell实现关联数组用 shell 编写数组的输入输出;有一个文件,第一列存主机名,第二列为 IP 地址,如何输入主机名返回 IP 地址,shell 编写实现;while read host ip; do eval ${host}=${ip}done# 这样就可以直接 ech...
分类:
编程语言 时间:
2015-01-17 11:10:27
阅读次数:
165
今天遇到安卓的一个bug,调了半天才解决。bug描写叙述:例如以下图,水平放置一个editTextView和一个button,通过android:layout_alignBottom="@+id/ds_bt_done"之类的方法非常easy让两个组件水平对齐如今我给button加个颜色(Backgr...
分类:
其他好文 时间:
2015-01-17 11:09:41
阅读次数:
118
1.计算数组长度:
${#array[@]}
2.列出数组索引:
${!array[*]}或者${!array[@]}
3.打印数组中所有值:
${array[*]}或者${array[@]}
4.shell中遍历数组元素:
for str in ${array[@]};
do
echo $str;
done
5.定义空数组
uset arr...
分类:
编程语言 时间:
2015-01-12 09:24:38
阅读次数:
247