首先要说明的是,不要使用which来进行判断,理由如下:1、which非SHELL的内置命令,用起来比内置命令的开销大,并且非内置命令会依赖平台的实现,不同平台的实现可能不同。#
type typetype is a shell builtin# type commandcommand is a s...
分类:
其他好文 时间:
2014-06-29 15:27:20
阅读次数:
1334
最近写了一个shell脚本,用到了cp、time、cut、awk命令,把他们的使用方法给写下来:1.cp和mvcp命令:用来完成文件的复制,从源文件夹复制到目标文件夹。执行后源文件夹和目标文件夹均有源文件。mv
命令:用来移动文件。执行后,源文件夹中没有源文件。我经常用mv命令来重命名文件注意:cp...
分类:
系统相关 时间:
2014-06-29 14:03:19
阅读次数:
5085
Stack 一个简单确很有用的数据结构:FILOpackage Stackimport (
"errors" "fmt")const ( defaultLength=100)type Stack struct{ top int size int
element [...
分类:
其他好文 时间:
2014-06-07 05:14:42
阅读次数:
211
我们先来看看CSS3
Api中对position属性的相关定义:static:无特殊定位,对象遵循正常文档流。top,right,bottom,left等属性不会被应用。relative:对象遵循正常文档流,但将依据top,right,bottom,left等属性在正常文档流中偏移位置。而其层叠通过...
分类:
其他好文 时间:
2014-05-29 14:19:01
阅读次数:
290
问题:用以下代码为button绘制边框时,如button的height为1会导致button不显示(既没有边框,也没有button本身)。GradientDrawable
gradient = new GradientDrawable(Orientation.BOTTOM_TOP, new int[...
分类:
移动开发 时间:
2014-05-28 22:42:27
阅读次数:
508
.fixed {position: fixed;top: -5px;left: 0;width:
100%;box-shadow: 0 0 3px #f2f2f2;-webkit-box-shadow: 0 0 3px
#f2f2f2;-moz-box-shadow: 0 0 3px #f2f2f2...
分类:
其他好文 时间:
2014-05-28 22:41:25
阅读次数:
311
function setAnimation() { var attr = ["top",
"left"], b = 0; u = setInterval(function () { document.getElemen...
分类:
Web程序 时间:
2014-05-28 21:17:53
阅读次数:
426
echo
192.168.10.69>>ip.list-------------------------------------------#!/bin/bash#注意if和[]之间的空格rm
-f ~/fanr/shell/DiskUsageAlert/out.printout=$(cat ~/f...
分类:
系统相关 时间:
2014-05-28 14:54:26
阅读次数:
391
–-表现最差的前10名使用查询SELECT TOP 10 ProcedureName =
t.text, ExecutionCount = s.execution_count, AvgExecutionTime = isnull (
s.total_elapsed_time / s.executio...
分类:
数据库 时间:
2014-05-28 11:25:22
阅读次数:
449
一、if判断数字: $A=12 $B=15 if(("$A"<"$B"))
if(("$A"=="$B"))字符串: $A="HELLO" $B="WORLD" if [ "$A" = "FACT_LOGIN_USER" ] if [
"$A" = "$B" ]PS:字符串比较的时候...
分类:
其他好文 时间:
2014-05-28 09:32:44
阅读次数:
347