锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品综合一区二区三区,亚洲精品白浆高清,性做久久久久久久免费看http://www.aygfsteel.com/stevenjohn/category/54674.html閭d簺闈掓槬鐨勫瞾鏈?/description>zh-cnTue, 13 Jan 2015 15:20:57 GMTTue, 13 Jan 2015 15:20:57 GMT60shell璇繪枃浠剁殑鏂規硶 http://www.aygfsteel.com/stevenjohn/archive/2015/01/13/422202.htmlabinabinTue, 13 Jan 2015 04:59:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2015/01/13/422202.htmlhttp://www.aygfsteel.com/stevenjohn/comments/422202.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/13/422202.html#Feedback1http://www.aygfsteel.com/stevenjohn/comments/commentRss/422202.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/422202.html璇繪枃浠剁殑鏂規硶錛?/p>

絎竴姝ワ細 灝嗘枃浠剁殑鍐呭閫氳繃綆¢亾錛坾錛夋垨閲嶅畾鍚戯紙<錛夌殑鏂瑰紡浼犵粰while

絎簩姝ワ細 while涓皟鐢╮ead灝嗘枃浠跺唴瀹逛竴琛屼竴琛岀殑璇誨嚭鏉ワ紝騫朵粯鍊肩粰read鍚庤窡闅忕殑鍙橀噺銆傚彉閲忎腑灝變繚瀛樹簡褰撳墠琛屼腑鐨勫唴瀹廣?/p>

渚嬪璇誨彇鏂囦歡/sites/linuxpig.com.txt

1錛夌閬撶殑鏂瑰紡錛?/strong>
 
     cat /sites/linuxpig.com.txt |while read LINE
     do
         echo $LINE
     done

    褰撶劧涔熷彲浠ュ皢cat /sites/linuxpig.com.txt 鍐欐垚涓浜涘鏉備竴浜涚殑錛屾瘮濡傦細
    
    紺轟緥1錛?/strong>
    find -type f -name "*.txt" -exec cat |while read LINE
     do
         echo $LINE
     done
    鍙互灝嗗綋鍓嶇洰褰曟墍鏈変互 .txt 緇撳熬鐨勬枃浠惰鍑?br style="word-wrap: break-word;" />    
    紺轟緥2錛?/strong>
    grep -r "linuxpig.com" ./ | awk -F":" '{print $1}' | cat |while read LINE
     do
         echo $LINE
     done

    鍙互灝嗗惈鏈?"linuxpig.com" 瀛楃涓茬殑鎵鏈夋枃浠舵墦寮騫惰鍙栥傘?/p>

    紺轟緥娌℃湁瀹為檯嫻嬭瘯錛屽鏋滀嬌鐢ㄨ鍏堟祴璇曘傘傘傘傘?-)
    

2錛夐噸瀹氬悜鐨勬柟寮忥細

  2.1 鍒╃敤閲嶅畾鍚戠<

     while read LINE
     do
         echo $LINE
     done < /sites/linuxpig.com.txt

  2.2 鍒╃敤鏂囦歡鎻忚堪絎︼紙0~9錛夊拰閲嶅畾鍚戠 <

     exec 3<&0
     exec 0</sites/linuxpig.com.txt
     while read LINE
     do
         echo $LINE
     done
     exec 0<&3



abin 2015-01-13 12:59 鍙戣〃璇勮
]]>
shell 鍩烘湰璧嬪?/title><link>http://www.aygfsteel.com/stevenjohn/archive/2015/01/11/422169.html</link><dc:creator>abin</dc:creator><author>abin</author><pubDate>Sat, 10 Jan 2015 17:23:00 GMT</pubDate><guid>http://www.aygfsteel.com/stevenjohn/archive/2015/01/11/422169.html</guid><wfw:comment>http://www.aygfsteel.com/stevenjohn/comments/422169.html</wfw:comment><comments>http://www.aygfsteel.com/stevenjohn/archive/2015/01/11/422169.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/stevenjohn/comments/commentRss/422169.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/stevenjohn/services/trackbacks/422169.html</trackback:ping><description><![CDATA[<div>1銆佹妸鍛戒護緇撴灉璧嬪肩粰鍙橀噺</div><div>#!/bash/bin</div><div>echo "1 2 3 4"|awk '{print $1}'</div><div>temp=`echo "1 2 3 4"|awk '{print $1}'`;</div><div>echo $temp;<br />2銆?br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div><img src ="http://www.aygfsteel.com/stevenjohn/aggbug/422169.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/stevenjohn/" target="_blank">abin</a> 2015-01-11 01:23 <a href="http://www.aygfsteel.com/stevenjohn/archive/2015/01/11/422169.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>shell 緙栫▼鈥斺攆or in 寰幆http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422167.htmlabinabinSat, 10 Jan 2015 14:06:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422167.htmlhttp://www.aygfsteel.com/stevenjohn/comments/422167.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422167.html#Feedback0http://www.aygfsteel.com/stevenjohn/comments/commentRss/422167.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/422167.html   for in 鏍煎紡
for 鏃?鍙橀噺 in 瀛楃涓?/span>
do
  $鍙橀噺
done
涓綆鍗曠殑瀛楃涓?鏋氫婦閬嶅巻娉曪紝鍒╃敤for in鏍煎紡瀵瑰瓧絎︿覆鎸夌┖鏍煎垏浠?/span>鐨勫姛鑳?br />
SERVICES="80   22   25   110   8000   23   20   21   3306   "

for   x   in   $SERVICES    
  do     
  iptables   -A   INPUT   -p   tcp   --dport   $x   -m   state   --state   NEW   -j   ACCEPT     
  done 

  
    for variable in values   --------瀛楃涓叉暟緇勪緷嬈¤祴鍊?/span>
#!/bin/sh
for i in a b c           瀛楃涓插垪琛ˋ B C 
         瀛楃涓茬敤絀烘牸鍒嗛殧,娌℃湁鎷彿,娌℃湁閫楀彿, 鐒跺悗寰幆灝嗗叾渚濇璧嬬粰鍙橀噺i
         鍙橀噺娌℃湁$
do
echo "i is $i"
done  
[macg@machome ~]$ sh test.sh
i is a
i is b
i is c


    for in 閲岋紝鍙橀噺鍜?涓嶇瓑浠?/span>
#!/bin/bash

for i in *.h ;
do
cat ${i}.h
done  
[macg@vm test]$ ./tip.sh
cat: *.h.h: No such file or directory 
$i浠h〃鐨勬槸鏁翠釜璺緞錛岃屼笉鏄?.h閲岀殑.h鍓嶉潰鐨勯儴鍒?/span>
鏀規
#!/bin/bash

for i in *.h
do
cat $i
done  
[macg@vm test]$ echo hahaha >>1.h
[macg@vm test]$ echo ha >>2.h

[macg@vm test]$ ./tip.sh
hahaha
ha    
渚?錛?br />
for i in /etc/profile.d/*.sh 
 do
  $i
done  
 $i浠h〃鐨勬槸/etc/profile.d/color.sh,
/etc/profile.d/alias.sh, /etc/profile.d/default.sh

          
    for in 瀵?鍛戒護琛岋紝鍑芥暟)鍙傛暟閬嶅巻
test()
{
        local i

        for i in $* ; do
             echo "i is $i"
        done
  
$*鏄瓧絎︿覆錛氫互"鍙傛暟1 鍙傛暟2 ... " 褰㈠紡淇濆瓨鎵鏈夊弬鏁?nbsp;
$i鏄彉閲廼鐨勫簲鐢ㄨ〃紺?br />
[macg@machome ~]$ sh test.sh p1 p2 p3 p4

i is p1
i is p2
i is p3
i is p4 


    for in璇彞涓庨氶厤絎?鍚堢敤,鎵歸噺澶勭悊鏂囦歡
    鎵歸噺鏀規枃浠跺悕
[root@vm testtip]# ls
aaa.txt  ccc.txt  eee.txt  ggg.txt  hhh.txt  jjj.txt  lll.txt  nnn.txt
bbb.txt  ddd.txt  fff.txt  go.sh    iii.txt  kkk.txt  mmm.txt  ooo.txt
[root@vm testtip]# cat go.sh
for i in *.txt                 *.txt鐩稿綋浜庝竴涓瓧絎︿覆鏁扮粍錛屼緷嬈″驚鐜祴鍊肩粰i
do
mv "$i" "$i.bak"       
done
[root@vm testtip]# sh go.sh

[root@vm testtip]# ls
aaa.txt.bak  ccc.txt.bak  eee.txt.bak  ggg.txt.bak  hhh.txt.bak  jjj.txt.bak  lll.txt.bak  nnn.txt.bak bbb.txt.bak  ddd.txt.bak  fff.txt.bak  go.sh        iii.txt.bak  kkk.txt.bak  mmm.txt.bak  ooo.txt.bak

    for in璇彞涓巂 `鍜?( )鍚堢敤錛屽埄鐢?span style="color: #ff0000">` `鎴?( )鐨勫皢澶氳鍚堜負涓琛岀殑緙洪櫡錛屽疄闄呮槸鍚堜負涓涓瓧絎︿覆鏁扮粍

for i in $(ls *.txt)        
do
echo $i
done
[macg@machome ~]$ sh test
111-tmp.txt
111.txt
22.txt
33.txt
鎴栬呰錛屽埄鐢╢or in鍏嬫湇` `鍜?( ) 鐨勫琛屽悎涓轟竴琛岀殑緙洪櫡


   鍒╃敤for in 鑷姩瀵瑰瓧絎︿覆鎸夌┖鏍奸亶鍘嗙殑鐗規э紝瀵瑰涓洰褰曢亶鍘?/span>
LIST="rootfs usr data data2"
   
for d in $LIST; do         
  mount /backup/$d
  rsync -ax --exclude fstab --delete /$d/ /backup/$d/
  umount /backup/$d
done    



abin 2015-01-10 22:06 鍙戣〃璇勮
]]>
shell mysql 鏌ヨhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422166.htmlabinabinSat, 10 Jan 2015 14:04:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422166.htmlhttp://www.aygfsteel.com/stevenjohn/comments/422166.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422166.html#Feedback0http://www.aygfsteel.com/stevenjohn/comments/commentRss/422166.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/422166.html
#!/bin/bash
mysql -u* -h* -p* <<EOF
    Your SQL script.
EOF
2銆?span style="font-family: Tahoma, Helvetica, Arial, 瀹嬩綋, sans-serif; line-height: 25px; background-color: #f7fcff;">鍑嗗涓涓猻ql鑴氭湰錛屽update.sql錛岀劧鍚庢墽琛屽涓嬪懡浠わ細

mysql -uroot -ppassword < update.sql
3銆?br />mysql -Dftp -uroot -proot -e"select user FROM users" >users.txt
catfilename="users.txt"

for i in `cat $catfilename`;
do
  
        echo "$i"
   
done
4銆?br />
echo "select user FROM ftp.users" | mysql -u root -proot

5銆?span style="color: #555555; font-family: 瀹嬩綋, 'Arial Narrow', arial, serif; line-height: 28px; background-color: #ffffff;">浣跨敤mysql鍙傛暟鐨勬柟娉?/span>
mysql -u$user -p$pass -D $db -e "select host from user;"
6銆佸拷鐣ysql鍒楀悕
  #!/bin/bash
MYSQL=mysql #閫夌敤mysql紼嬪簭
USER=root #璁懼畾鐢ㄦ埛鍚?br /> PASSWORD="123456" #璁懼畾鏁版嵁搴撶殑鐢ㄦ埛瀵嗙爜
DB=eucalyptus_auth #閫夊畾闇瑕佺殑鏁版嵁搴?br />
COMMAND="select auth_user_query_id, auth_user_secretkey from auth_users where auth_user_name=\"admin\" " #鏌ユ壘闇瑕佺殑鏁版嵁sql璇彞
declare count=`$MYSQL -u${USER} -p${PASSWORD} -D ${DB} -e "${COMMAND}" --skip-column-name` #鎵цmysql鐨勬煡璇紝騫跺皢鍏惰褰曞埌count涓?br /> for list in $count
do
echo " the item is $list"
done #璇誨彇寰楀埌鐨勬暟鎹?/pre>7銆佸彇鍑烘暟鎹〃閲岄潰鐨勪竴琛岀殑絎竴鍒?br />
#!/bin/sh
HOST="192.168.111.11"
PORT="3306"
USERNAME="root"
PWD="root"
DBNAME="abin"
TNAME="city"
select_sql="select * from ${TNAME}"
mysql -h${HOST} -P${PORT} -u${USERNAME} -p${PWD} ${DBNAME} -e "set names utf8; ${select_sql}" --skip-column-name| while read line;
do
        midd=`echo "$line" | awk '{print $1}'`;
        echo ${midd};
done;
~              
8銆?br />
 mysql database -u $user -p $password -e "SELECT A, B, C FROM table_a"|while read a b c
do
echo $a $b $c
don 
9銆?br />
 exec 8<>file
mysql database -u $user -p $password -e "SELECT A, B, C FROM table_a"
while read a b c
do
echo $a $b $c
done<&8 

10銆?br />
#!/bin/sh
HOST="localhost"
PORT="3306"
USERNAME="root"
PWD=""
DBNAME="abin"
CITYNAME="city"
BNAME="bussiness"
HNAME="height"
parameter=$1
type=$2
echo "parameter=${parameter},type=${type}"
select_sql="select * from ${CITYNAME} t where t.code='${parameter}'"
mysql -h${HOST} -P${PORT} -u${USERNAME} -p${PWD} ${DBNAME} -e "set names utf8; ${select_sql}" --skip-column-name| while read a b c;
do
        id=${a};
        echo "id=${id}"
        if [ $type = 1 ];then
                echo "type=${type},id=${id}"
                bus_sql="select * from ${BNAME} t where t.ccode=${id}"
                mysql -h${HOST} -P${PORT} -u${USERNAME} -p${PWD} ${DBNAME} -e "set names utf8; ${bus_sql}" --skip-column-name | while read d e f g;
                do
                        echo "bussiness=${e},city_code=${g},bussiness_code=${f}"
                done
        elif [ $type = 2 ];then
                echo "type=${type},id=${id}"
                hei_sql="select * from ${HNAME} t where t.ccode=${id}"
                mysql -h${HOST} -P${PORT} -u${USERNAME} -p${PWD} ${DBNAME} -e "set names utf8; ${hei_sql}" --skip-column-name | while read h i j k;
                do
                        echo "sex=${i},height=${j},city_code=${k}"
                done
        else
                echo "others"
        fi;
done




















abin 2015-01-10 22:04 鍙戣〃璇勮
]]>shell 鑴氭湰 閬嶅巻select鐨勭粨鏋滈泦鎬庝箞瀹炵幇http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422165.htmlabinabinSat, 10 Jan 2015 13:08:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422165.htmlhttp://www.aygfsteel.com/stevenjohn/comments/422165.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422165.html#Feedback0http://www.aygfsteel.com/stevenjohn/comments/commentRss/422165.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/422165.html浠?MySQL 涓轟緥:
mysql -e "select * from tbl" while read line ; do echo "$line" done




abin 2015-01-10 21:08 鍙戣〃璇勮
]]>
shell鑴氭湰璇誨彇mysql緇撴灉闆嗙殑鍊?/title><link>http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422164.html</link><dc:creator>abin</dc:creator><author>abin</author><pubDate>Sat, 10 Jan 2015 13:06:00 GMT</pubDate><guid>http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422164.html</guid><wfw:comment>http://www.aygfsteel.com/stevenjohn/comments/422164.html</wfw:comment><comments>http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422164.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/stevenjohn/comments/commentRss/422164.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/stevenjohn/services/trackbacks/422164.html</trackback:ping><description><![CDATA[<span style="font-family: Arial, 瀹嬩綋; line-height: 24px; text-indent: 14px; background-color: #f7fcff;">鍦╨inux涓嬬敤shell鑴氭湰璇誨彇mysql緇撴灉闆嗕腑鍊肩殑浜岀鏂規硶錛屾寜琛岃鍙杝ql緇撴灉錛屽皢sql鎵ц緇撴灉璇誨彇鍒皊hell鍙橀噺涓紝鐒跺悗璇誨彇銆?br /></span><table class="td_100 table99" cellspacing="0" cellpadding="0" style="font-size: 9pt; font-family: Tahoma, Verdana; color: #000000; border-collapse: collapse; width: 1115px; height: 712px; table-layout: fixed; word-break: break-all;"><tbody><tr valign="top"><td colspan="4" style="table-layout: fixed; font-size: 9pt; word-break: break-all; border-right-width: 0px; border-top-width: 0px; font-family: tahoma, fantasy; border-collapse: collapse;"><table class="table99 td140" cellpadding="0" cellspacing="0" style="font-size: 9pt; font-family: Tahoma, Verdana; color: #000000; border-collapse: collapse; width: 1103px;"><tbody><tr><td valign="top" style="table-layout: fixed; font-size: 14px; word-break: break-all; border-right-width: 0px; border-top-width: 0px; line-height: 1.6em; font-family: tahoma, fantasy; border-collapse: collapse;"><div id="wmqeeuq" class="topic_content" id="content1" style="letter-spacing: 1px; width: 1103px; line-height: 1.5em; word-wrap: break-word; word-break: break-all; overflow: auto; color: #333333;"></div></td></tr><tr><td class="td45" colspan="4" style="table-layout: fixed; font-size: 9pt; word-break: break-all; border-right-width: 0px; border-top-width: 0px; font-family: tahoma, fantasy; border-collapse: collapse;"><div id="wmqeeuq" class="divTitle"><h1 style="margin: 10px 0px; font-size: 18px; line-height: 30px;"><strong style="font-size: 14px;">shell鑴氭湰璇誨彇mysql緇撴灉闆嗙殑鍊?/strong></h1></div></td></tr><tr valign="top"><td colspan="4" style="table-layout: fixed; font-size: 9pt; word-break: break-all; border-right-width: 0px; border-top-width: 0px; font-family: tahoma, fantasy; border-collapse: collapse;"><table class="table99 td140" cellpadding="0" cellspacing="0" style="font-size: 9pt; font-family: Tahoma, Verdana; color: #000000; border-collapse: collapse; width: 1103px;"><tbody><tr><td valign="top" style="table-layout: fixed; font-size: 14px; word-break: break-all; border-right-width: 0px; border-top-width: 0px; line-height: 1.6em; font-family: tahoma, fantasy; border-collapse: collapse;"><div id="wmqeeuq" class="topic_content" id="content1" style="letter-spacing: 1px; width: 1103px; line-height: 1.5em; word-wrap: break-word; word-break: break-all; overflow: auto; color: #333333;"><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;">鎸夎璇誨彇sql緇撴灉錛?/p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;"></p><div class="wmqeeuq" id="eng" style="padding: 5px 5px 5px 15px; margin: 10px; background-color: #ebeced; overflow: auto; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.9px; line-height: 1.6em; background-position: initial initial; background-repeat: initial initial;">while read -a row<p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;"></p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;">do</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;"> echo "..${row[0]}..${row[1]}..${row[2]}.."</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;">done < <(echo "SELECT A, B, C FROM table_a"</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;"> mysql database -u $user -p $password)</p></div><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;"></p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;">灝唖ql鎵ц緇撴灉璇誨彇鍒皊hell鍙橀噺涓細</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;"></p><div class="wmqeeuq" id="eng" style="padding: 5px 5px 5px 15px; margin: 10px; background-color: #ebeced; overflow: auto; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.9px; line-height: 1.6em; background-position: initial initial; background-repeat: initial initial;">while read a b c<p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;"></p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;">do</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;"> echo "..${a}..${b}..${c}.."</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;">done < <(echo "SELECT A, B, C FROM table_a"</p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 0px; width: 1063px; clear: both;"> mysql database -u $user -p $password)</p></div><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;"></p><p style="table-layout: fixed; word-break: break-all; line-height: 1.6em; margin: 6px 0px; width: 1103px; clear: both;"></p></div></td></tr></tbody></table><br /></td></tr></tbody></table></td></tr></tbody></table><span style="font-family: Arial, 瀹嬩綋; line-height: 24px; text-indent: 14px; background-color: #f7fcff;"><br /><br /><br /></span><img src ="http://www.aygfsteel.com/stevenjohn/aggbug/422164.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/stevenjohn/" target="_blank">abin</a> 2015-01-10 21:06 <a href="http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422164.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>mysql shell 涔辯爜http://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422163.htmlabinabinSat, 10 Jan 2015 12:58:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422163.htmlhttp://www.aygfsteel.com/stevenjohn/comments/422163.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422163.html#Feedback0http://www.aygfsteel.com/stevenjohn/comments/commentRss/422163.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/422163.html緇忓父瑕佸湪shell涓嬫煡璇㈡暟鎹簱鐨勪笢瑗匡紝鏁版嵁搴撴湁涓枃錛宻hell鏄劇ず灝辨槸涔辯爜錛屾湁鍑犱釜鏂規硶鐪嬬湅緇撴灉
棣栧厛linux涓枃瀛椾綋瑕佸畨瑁咃紝榪欎釜鑷繁瑁咃紝鏁版嵁搴撶殑瀛楃闆嗚鏀寔涓枃錛屾垜鐨勬敮鎸佸晩錛岀劧鍚庡氨鏄湪鍐檚hell鐨勬椂鍊欑殑闂浜?/div>
mysql -u root -p  --default-character-set=utf8 db -e "select * from tb where A=10;"
榪欎釜鏄劇ず鐨勫氨鏄貢鐮?/div>
mysql -u root -p db -e "set names utf8 ;select * from tb where A=10;"
榪欎釜榪樻槸涔辯爜
mysql -u root -p db -e "set names Latin1 ;select * from tb where A=10;"
榪欎釜涔熸槸涔辯爜
mysql -u root -p db -e "set names gbk ;select * from tb where A=10;"
鏈鍚庤繖涓嵈鏄劇ず涓枃浜嗭紒錛侊紒錛?br />




http://wdegang.blog.51cto.com/134120/1137929


abin 2015-01-10 20:58 鍙戣〃璇勮
]]>linux if elif else fihttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422162.htmlabinabinSat, 10 Jan 2015 11:19:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422162.htmlhttp://www.aygfsteel.com/stevenjohn/comments/422162.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2015/01/10/422162.html#Feedback0http://www.aygfsteel.com/stevenjohn/comments/commentRss/422162.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/422162.html
#!/bash/bin
parameter=$1
if [ $parameter = "a" ];then
        echo "equals"
elif [ $parameter = "b" ];then
        echo "not"
else
        echo "kong"
fi
2銆佹帴鏀秎inuxshell鎺у埗鍙拌緭鍏ョ殑鏁板瓧鍙傛暟錛?br />
#!/bash/bin
parameter=$1
if [ $parameter = 1 ];then
        echo "input is $parameter"
elif [ $parameter = 2 ];then
        echo "input is $parameter"
else
        echo "input is other: $parameter"
fi


3銆佹帴鏀秎inuxshell鎺у埗鍙拌緭鍏ョ殑鏃墮棿鍙傛暟錛?br />












abin 2015-01-10 19:19 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 抚顺市| 庆元县| 哈巴河县| 武强县| 淮北市| 望都县| 德阳市| 锡林郭勒盟| 蓬溪县| 泾川县| 九江县| 金溪县| 老河口市| 营山县| 彭州市| 绵阳市| 罗江县| 宜昌市| 上饶县| 宿松县| 北票市| 镶黄旗| 宜川县| 安仁县| 怀宁县| 通渭县| 方城县| 辽阳市| 龙里县| 营口市| 甘谷县| 乳山市| 景东| 大新县| 清苑县| 上犹县| 江陵县| 漾濞| 邮箱| 长治县| 安图县|