例1:#!/bin/bashsum=0;for i in {1..100..2}dolet "sum+=i"doneecho "the sum is $sum"例2:#!/bin/bashcd /rootls *.sh > ls.logy=1for i in $(cat ls.log) do ech...
分类:
其他好文 时间:
2014-09-06 18:37:23
阅读次数:
187
";//3.$g=true && false;//结果为false$h=true and false;//结果为true.因为and的运算优先级比=低 var_dump($g,$h);$a="hello ,world";$b=123;$c=$b.$a;//$a 具体表示内容和$b 表示内容拼接ech...
分类:
Web程序 时间:
2014-08-28 00:45:58
阅读次数:
327
最近一直在研究Zabbix监控Windows机器,涉及到如何快速安装agent,如何修改和完善windows监控模板等等。想把自己的经验给大家分享一下,希望对大家有所帮助。1)安装agent客户端首先分享一下我写的自动化安装Windows机器的agentd安装脚本zabbix_agentd_install_windows.bat。@ech..
一份不错的php面试题,附答案,有准备换工作的同学可以参考一下. 一、基础题 1. 写出如下程序的输出结果 <?php $str1 = null; $str2 = false; echo $str1==$str2 ? ‘相等‘ : ‘不相等‘; $str3 = ‘‘; $str4 = 0; ech...
分类:
Web程序 时间:
2014-08-17 15:41:42
阅读次数:
251
----------------------------------------------------------------------------------------------------------能完成大部分输出任务的命令:echoecho helloworld; #正确ech...
分类:
其他好文 时间:
2014-08-13 03:27:55
阅读次数:
205
此文仅为学习记录,内容会包括一些数学概念,定义,个人理解的摘要。希望能够分享一些学习内容。第一节:Row Reduction and Echelon FormsEchelon form: 行消元后的矩阵Reduced echelon form: 行消元并且leading entry为1的矩阵。Ech...
分类:
移动开发 时间:
2014-07-27 09:48:32
阅读次数:
1728
0.前言
本文总结如何使用echo命令向文件中写入内容,例如使用echo指令覆盖文件内容,使用echo指令向文件追加内容,使用echo指令往文件中追加制表符。
echo向文件中输出内容的基本方法是使用IO重定向指令——“>”,默认情况下echo输出到标准输出中,使用>指令可重定向输出到文件中。
1.echo指令基本用法
【1】Linux官方用户手册——ech...
分类:
系统相关 时间:
2014-06-30 18:03:10
阅读次数:
284
1.用PHP打印出前一天的时间,打印格式是2007年5月10日22:21:212.PHP代码如下:$a="hello";$b=&$a;unset($b);$b="world";echo$a;其结果是?3.PHP代码如下:$str="cd";$$str="landog";$$str.="ok";ech...
分类:
Web程序 时间:
2014-06-28 18:50:17
阅读次数:
182
遍历目录中所有文件,并且统计文件类型。#!/bin/bash
#filename:filestat.sh
#set-x
if[$#-ne1];
then
echo$0basepath;
echo
fi
path=$1
declare-Astatarray;
whilereadline;
do
ftype=`file-b"$line"`
letstatarray["$ftype"]++;
done<<(find$path-typef-print)
ech..
分类:
其他好文 时间:
2014-06-28 00:16:08
阅读次数:
224
EventMachine
本文主要是
EventMachine如何建一个简单的Echo服务器post_init, unbind, receive_date 方法
EchoServer
如下代码,是建立一个简单的EchoServer
#!/usr/bin/env rubyrequire 'rubygems'require 'eventmachine' class Ech...
分类:
其他好文 时间:
2014-05-22 11:14:26
阅读次数:
181