参考与http://blog.csdn.net/xingyu0806/article/details/52080962 IFNULL(expr1,expr2) 假如expr1不为NULL,则 IFNULL() 的返回值为expr1; 否则其返回值为 expr2(数字或是字符串)。IFNULL()的返 ...
分类:
数据库 时间:
2018-01-26 20:41:11
阅读次数:
257
#!/bin/bashsum=0exec<$1whilereadline;dosize=echo$line|awk‘{print$10}‘expr$size+1&>/dev/nullif[$?-ne0];thencontinuefi((sum=sum+size))doneecho"Thetotalbyes=echo$((${sum}/1024))&qu
分类:
数据库 时间:
2018-01-24 12:42:24
阅读次数:
188
case whenhttp://blog.sina.com.cn/s/blog_4c538f6c01012mzt.htmlNVL NVL2 NULLIF Coalescehttps://www.cnblogs.com/zrui-xyu/p/4819712.htmljoin unionhttps:// ...
分类:
数据库 时间:
2018-01-23 20:44:48
阅读次数:
205
#!/bin/bashtotal=0num=$((RANDOM%41))pear(){read-p"pleaseinputnumber:"aexpr$a+1&>/dev/nullif[$?-ne0];thenecho"pleaseinputnumber;"pearfi}guess(){((total++))if[$a-eq$num];thene
分类:
其他好文 时间:
2018-01-23 11:52:01
阅读次数:
130
#!/bin/bashwhiletrue;doread-p"pleaseinput:"aexpr$a+1&>/dev/nullif[$?-eq0];thenecho"inputisint."elseecho"inputischar."fiif[$a==‘q‘];thenbreakfidone
分类:
其他好文 时间:
2018-01-11 11:46:53
阅读次数:
188
#!/bin/bashif[$#-ne2];thenecho"pleaseinputtwoarguments:"exit2fiexpr$1+2&>/dev/nullif[$?-ne0];thenecho"pleaseinputint."exit3fiexpr$2+3&>/dev/nullif[$?-ne0];thenecho&qu
分类:
其他好文 时间:
2018-01-11 11:24:14
阅读次数:
145
#!/usr/bin/bash**echo"##########关于cpu##########"vmstat&>/dev/nullif[$?-ne0];thenecho"vmstatcommandisnotfound,pleaseinstallit!"yuminstall-yprocpsecho"命令已安装!请重新执行该命令"
分类:
其他好文 时间:
2018-01-10 13:51:16
阅读次数:
184
1、编写脚本/root/bin/createuser.sh,实现如下功能:使用一个用户名做为参数,如果指定参数的用户存在,就显示其存在,否则添加之;显示添加的用户的id号等信息[$#-lt1]&&echo"inputusername!"&&exitid$1&>/dev/nullif[$?-eq1];thenuseradd$1;echo-e"successful\n`id$1`"elseecho"u
分类:
其他好文 时间:
2017-12-29 00:03:17
阅读次数:
247
Oracle中函数以前介绍的字符串处理,日期函数,数学函数,以及转换函数等等,还有一类函数是通用函数。主要有:NVL,NVL2,NULLIF,COALESCE,这几个函数用在各个类型上都可以。 下面简单介绍一下几个函数的用法。 在介绍这个之前你必须明白什么是oracle中的空值null 1.NVL函 ...
分类:
数据库 时间:
2017-11-29 11:31:54
阅读次数:
194
来源:http://blog.csdn.net/a466350665/article/details/52994761 http://blog.csdn.net/xingyu0806/article/details/52080962 IFNULL(expr1,expr2)用法:假如expr1不为NU ...
分类:
数据库 时间:
2017-11-28 01:29:22
阅读次数:
203