- Mac OS X 背后的故事(一)力挽狂澜的Ellen Hancock
- Mac OS X 背后的故事(二)Linus Torvalds的短视
- Mac OS X 背后的故事(三)Mach之父Avie Tevanian
- Mac OS X 背后的故事(四)政客的跨界
- Mac OS X 背後的故事(五)Jean-Marie Hullot 的天才天才發明 Interface Builder
- Mac OS X 背后的故事(六)上善若水 Cordell Ratzlaff 引发的 Aqua 革命(上)
- Mac OS X 背後的故事(七)上善若水 Cordell Ratzlaff 引發的 Aqua 革命(下)
- Mac OS X 背後的故事(八)三好學生 Chris Lattner 的 LLVM 編譯工具鏈
- Mac OS X 背後的故事(九)半導體的豐收(上)
- [Mac OS X 背後的故事(十)半導體的豐收(中)](https
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--必须使用绝对路径,否则当前路径是数据实例文件路径 | |
load data infile '/mdb/mysql/ExpData.csv' | |
--必须加上库名 | |
into table OAM.OCS_PROD_CELL_MSISDN | |
--正常的分隔符 | |
fields terminated by '|' | |
--Linux环境上不用使用'\n', windows环境上要使用'\r' | |
lines terminated by '\n' | |
--以此表字段进行导入 | |
(MSISDN_ID,MSISDN_FIRST,MSISDN_LAST,AREA_CODE,OPERATOR_CODE,EFF_DATE,EXP_DATE,BATCH_NO); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUM2CHAR := SELECT TO_CHAR(TO_DATE('19700101080000','yyyyMMddHH24miss')+((3684394329-2208988800)/86400), 'yyyyMMddHH24miss')FROM DUAL | |
CHAR2NUM := SELECT (TO_date('20160901000000'char,'yyyyMMddHH24miss') - to_date('19700101080000','yyyymmddhh24miss'))*86400+2208988800 FROM DUAL | |
DATE2NUM := SELECT (sysdate - to_date('19700101080000','yyyymmddhh24miss'))*86400+2208988800 FROM DUAL; | |
NUM2DATE := SELECT TO_DATE('19700101080000','yyyyMMddHH24miss')+((3684394329-2208988800)/86400) FROM DUAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File Destroyer 文件安全销毁 | |
* | |
* Copyright (C) 2015 Chaobs | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT to_char(last_day(add_months(sysdate,-1))+1,'yyyymmdd')||'000000' '生效日期',TO_CHAR(last_day(add_months(sysdate,1)),'yyyymmdd')||235959 '失效日期' FROM DUAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. $HOME/.profile | |
echo "start `basename $0`" | |
#echo $* | |
declare -a number=0 | |
declare -i i=0 | |
#read number | |
cat number.txt |while read num | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source $HOME/.profile | |
#declare a number array | |
declare -a serialNumber=0 | |
declare -i i=0 | |
#Alibase Database Connection String | |
AltibaseConn='isql -s 10.161.7.56 -u occ_bf -p occ_bf -port 20300 -NLS_USE US7ASCII' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#批量添加用户 | |
read -p "Please input user name: " -t 30 name | |
read -p "Please input the number of users: " -t 30 num | |
read -p "Please input the password of users: "-t 30 pass | |
if [ ! -z "$name" -a ! -z "$num" -a ! -z "$pass" ];then | |
#将num变量传给sed,sed进行判断是否为数字,如果为数字 | |
#将数字替换成空,如果有一个字符都不为数字,那么整个y就不会为空 | |
y=$(echo $num|sed 's/[0-9]//g') | |
#如果num全部为数字,那么条件才能为真,其实进行for循环 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#备份数据库 | |
datetime=$(date +%y%m%d) | |
size=$(du -sh /home/fatmouse/sh) | |
if [ -d /home/fatmouse/backup ];then | |
echo "Date: $datetime">/home/fatmouse/sh/info.txt | |
echo "Size: $size" >>/home/fatmouse/sh/info.txt | |
cd /home/fatmouse/backup | |
tar -zcf Backup_$datetime.tar.gz /home/fatmouse/sh /home/fatmouse/info.txt &> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#硬盘使用率报警 | |
Rate=`df -h|grep /dev/sda5|awk '{print $5}'|cut -f 1 -d "%"` | |
#变量如果使用整数判断,不需要双引号 | |
if [ $Rate -ge 90 ];then | |
echo -e "The filesystem is almost full!\n" | |
else | |
echo -e "The system is enough!\n" | |
fi |
NewerOlder