原创 shell歷險之——引用的迷途

shell歷險之——引用的迷途上篇:引用,奇怪的反斜線我們知道在shell中有兩類字符,一類是普通字符(literal),在shell中沒有任何特殊意義;另一類是所謂“元字符”(meta),在shell中有特殊的含義或用法。當我們需要去掉元

原创 Linux中exec source 命令相關

Linux中exec命令相關:exec和source都屬於bash內部命令(builtins commands),在bash下輸入man exec或man source可以查看所有的內部命令信息。  bash shell的命令分爲兩類:外部

原创 sql子查詢

select cust_name, cust_state, (select count(*) from orders where orders.cust_id=customers.cust_id) as orders from custom

原创 sql update 觸發器 可獲得被update的行的信息

代碼如下:create trigger TgName on tb for update as if update(recommend) begin update tb set commenddate=(getdate()) from tb

原创 linux shell $()和${}和$(())和(())

$()和${}和$(())和(())$()和${}的用法:在 bash shell 中,$( ) 與 ` ` (反引號) 都是用來做命令替換用(command substitution)的。而 $( ) 並不見的每一種 shell 都能使用

原创 yum使用詳解

yum(全稱爲 Yellow dog Updater, Modified)是一個在Fedora和RedHat以及SUSE中的Shell前端軟件包管理器。基於RPM包管理,能夠從指定的服務器自動下載RPM包並且安裝,可以自動處理依賴性關係,並

原创 centos mysql-5.6.22 主從複製

環境: centos6.5   mysql-5.6.22  master 192.168.3.11       centos6.5   mysql-56.22   slave  192.168.3.150MySQL支持單向、異步複製,複製過

原创 SQL2000置疑數據庫修復

SQL置疑數據庫修復 說明:[dbname]爲示例置疑數據庫。此方法只適應SQLServer2000。請先檢查一下:USE master goSELECT * FROM sysdatabases WHERE name='dbname'--檢

原创 mysql安裝後常見故障

1:[root@localhost ~]# mysql -u rootEnter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socke

原创 LinuxShell算術運算

Bash shell 的算術運算有四種方式:1:使用 expr 外部程式加法 r=`expr 4 + 5`echo $r注意! '4' '+' '5' 這三者之間要有空白r=`expr 4 * 5` #錯誤乘法 r=`expr 4 \* 5

原创 gawk 使用-F時指定多個分隔符

如果要獲取linux eth0的ip地址#ifconfig eth0 |grep "inet addr"           inet addr:192.168.119.128  Bcast:192.168.119.255  Mask:25

原创 linux

1:find . -name *http*   -follow 可查找當前目錄下所有文件名稱包含http的文件,包括連接到其他目錄的文件  -follow可查找軟鏈接2:ls -R  可以列出所有的文件,包括子目錄的文件3:4:vim查找字