#!/bin/bash
echo?"fdisk?success"
-sed?-i?‘/fdisk.sh/d‘??/etc/rc.d/rc.local
+sed?-i?‘s/fdisk.sh/reboot.sh/‘??/etc/rc.d/rc.local
+?reboot 主要是格式化磁盘,写在 /etc/rc.local 删除不彻底(...
分类:
其他好文 时间:
2014-07-29 16:20:49
阅读次数:
300
#!/bin/bash
#
#Judgingtheelementisafileorafolder
if[$#-lt1];then
echo"ERROE!!Usage:ckfile.shARGS1[ARGS2...]"
exit4
fi
foriin`seq1$#`
do
if[-f$1];then
echo$1isacommomfile
elif[-d$1];then
echo$1isadirectory
else
echo"$1isnotexsitorunknown!"
fi
shift
done知识..
分类:
其他好文 时间:
2014-07-29 16:01:19
阅读次数:
184
控制器controller下的welcome.phppublicfunctiondoJson(){
$data=array(‘a‘,‘b‘,‘c‘,‘d‘);
if($_POST[‘k‘])
echo$data=json_encode($data);
}视图view下的json.php<!DOCTYPEHTML>
<html>
<head>
<scriptsrc="<?phpechobase_url();?>static/js/jqu..
分类:
Web程序 时间:
2014-07-29 15:57:59
阅读次数:
266
<?php#加密算法header(‘content-type:text/html;charset=utf-8;‘);$password=‘hugehugehuge‘;$pwd=‘hugehuge‘;//MD5加密,单向加密算法,两个参数,1必写,要加密的字符串,//2第二个参数是bool值,为真,MD5报文摘要将以16字节长度的原始二进制格式返回。返回32位字符串echo‘..
分类:
Web程序 时间:
2014-07-29 15:46:49
阅读次数:
278
<?php/*网页爬虫*/#最简单的使用,属性都采用默认值/*$curl=curl_init(‘http://www.baidu.com‘);$output=curl_exec($curl);curl_close($curl);echo$output;*/#稍微复杂一点的,对页面进行操作/*$curl=curl_init();curl_setopt($curl,CURLOPT_URL,‘http://www.baidu.com‘);//..
分类:
Web程序 时间:
2014-07-29 15:46:39
阅读次数:
293
<?php//连接数据库//设置文档显示编码header(‘Content-type:text/html;charset=utf-8‘);if($con=mysql_connect(‘localhost‘,‘root‘,‘1234‘)){//返回连接标识符 echo‘连接成功<br>‘;}else{ echo‘连接失败<br>‘;}//选择数据库if(mysql_select_db(‘mydbtest‘)){ ec..
分类:
数据库 时间:
2014-07-29 15:46:29
阅读次数:
234
在编译Android的时候 把下面的函数,添加到 envsetup.sh, 还运行 build/envsetup.sh
function make()
{
local make=$(which make)
echo "you are running function make"
${make} $@
}
再运行 make, 运行的并不是可执行文件 make, 而...
分类:
其他好文 时间:
2014-07-29 14:47:48
阅读次数:
198
#include #include #include #include #include #include #include #define BUFFER_LENGTH 1024void ReverseMessage(char buffer[], ssize_t receivedBytesCount...
分类:
其他好文 时间:
2014-07-29 14:02:28
阅读次数:
222
cat /proc/meminfo cat /proc/cpuinfo ipcs -a ipcs -m ipcs -s ipcs -q mkdir -p name当父目录不存在是创建它infocmp vt100 echo$TERM xterm konsole getconf LONG_BIT arc...
分类:
系统相关 时间:
2014-07-29 11:01:26
阅读次数:
451
1.for循环语句实例1.1 最基本的for循环#!/bin/bashfor x in one two three fourdo echo number $xdone注:"for" 循环总是接收 "in" 语句之后的某种类型的字列表。在本例中,指定了四个英语单词,但是字列表也可以引用磁盘上的文件,甚...
分类:
其他好文 时间:
2014-07-28 19:10:04
阅读次数:
307