写一个shell脚本,要求打印出文档中只含有一个数字的行:#!/bin/bash
foriin`cat/root/passwd`;do
n=`echo$i|sed‘s/[^0-9]//g‘|wc-c`
#echo$n
if[$n-eq2];then
echo$i
else
continue
fi
done执行以下此脚本文件:[root@ceshi~]#catpasswd
root:x:0:0:root:/root:/bin/bash
bin:..
分类:
系统相关 时间:
2016-04-28 15:30:45
阅读次数:
367
/lib/dracut/hooks/shutdown/30-dm-shutdown.sh 98.77% done, estimate finish Wed Apr 27 10:31:23 2016 ...
分类:
其他好文 时间:
2016-04-27 10:48:06
阅读次数:
288
Here is the original guid:
Postfix+Dovecot+MySQL搭建邮件服务器
The reference above was written for Ubuntu, I found some changes must be done to apply the techniques with my CentOS scenario.
Another h...
分类:
数据库 时间:
2016-04-22 19:45:31
阅读次数:
327
批量修改文件后缀第一种:#!/bin/bash
forfnin*.$1
do
mv$fn${fn%$1}$2
done第二种:find.-name"*.txt"|awk-F‘[./]+‘‘{print$2}‘|xargs-i-tmv{}.txt{}.shGREP用户小技巧文件如下:#cattest.txt
Thisisatestfile
agooddayandnocoludy
Sithereandsingasong
missagaoisting
butmon..
分类:
系统相关 时间:
2016-04-22 16:47:48
阅读次数:
207
http://stackoverflow.com/questions/4130194/what-is-the-difference-between-task-and-thread 回答一: A task is something you want done. A thread is one of t ...
分类:
其他好文 时间:
2016-04-20 11:27:59
阅读次数:
158
1、添加 animator的avatar。 a.现将工程面板的动画文件的文件格式改为humanoid,apply一下,然后configure一下。如果没有什么需要修改的就点done。改的就apply一下再done。然后点击创建面板就会发现我们的角色的组件上已经存在了animator的组件了。接下来我 ...
分类:
其他好文 时间:
2016-04-20 02:00:25
阅读次数:
168
一个独立游戏 Teleglitch 使用了一种欺骗手法来模拟视锥,效果如下:
博主看了看了看提示
Actually, the line of sight shadows aren’t done with perspective. They are just black polygons extruded from the walls away from the player. ...
分类:
编程语言 时间:
2016-04-16 12:36:42
阅读次数:
215
一个独立游戏 Teleglitch 使用了一种欺骗手法来模拟视锥,效果如下: 博主看了看了看提示 Actually, the line of sight shadows aren’t done with perspective. They are just black polygons extrud ...
分类:
编程语言 时间:
2016-04-16 12:17:59
阅读次数:
192
I0415 15:03:37.603461 27311 solver.cpp:42] Solver scaffolding done.I0415 15:03:37.603549 27311 solver.cpp:247] Solving AlexNetI0415 15:03:37.603559 27 ...
分类:
其他好文 时间:
2016-04-15 15:21:01
阅读次数:
1854