Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux shell½Å±¾Ö®ifÅжÏ

ÎÞÂÛʲô±à³ÌÓïÑÔ¶¼Àë²»¿ªÌõ¼þÅжϡ£SHELLÒ²²»ÀýÍâ¡£
 if list then
          do something here
      elif list then
          do another thing here
      else
         do something else here
      fi   
EX1:
#!/bin/sh
SYSTEM=`uname -s`    #»ñÈ¡²Ù×÷ϵͳÀàÐÍ£¬ÎÒ±¾µØÊÇlinux
if [ $SYSTEM = "Linux" ] ; then     #Èç¹ûÊÇlinuxµÄ»°´òÓ¡linux×Ö·û´®
echo "Linux"
elif [ $SYSTEM = "FreeBSD" ] ; then   
echo "FreeBSD"
elif [ $SYSTEM = "Solaris" ] ; then
echo "Solaris"
else
echo "What?"
fi     #ifend
»ù±¾ÉÏºÍÆäËû½Å±¾ÓïÑÔÒ»Ñù¡£Ã»ÓÐÌ«´óÇø±ð¡£²»¹ýÖµµÃ×¢ÒâµÄÊÇ¡£[]ÀïÃæµÄÌõ¼þÅжϡ£
1 ×Ö·û´®ÅжÏ
str1 = str2¡¡¡¡¡¡¡¡¡¡¡¡µ±Á½¸ö´®ÓÐÏàͬÄÚÈÝ¡¢³¤¶ÈÊ±ÎªÕæ
str1 != str2¡¡¡¡¡¡¡¡¡¡ µ±´®str1ºÍstr2²»µÈÊ±ÎªÕæ
-n str1¡¡¡¡¡¡¡¡¡¡¡¡¡¡ µ±´®µÄ³¤¶È´óÓÚ0Ê±ÎªÕæ(´®·Ç¿Õ)
-z str1¡¡¡¡¡¡¡¡¡¡¡¡¡¡ µ±´®µÄ³¤¶ÈΪ0Ê±ÎªÕæ(¿Õ´®)
str1¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡   µ±´®str1Ϊ·Ç¿ÕÊ±ÎªÕæ
2 Êý×ÖµÄÅжÏ
int1 -eq int2¡¡¡¡¡¡¡¡Á½ÊýÏàµÈÎªÕæ
int1 -ne int2¡¡¡¡¡¡¡¡Á½Êý²»µÈÎªÕæ
int1 -gt int2¡¡¡¡¡¡¡¡int1´óÓÚint2ÎªÕæ
int1 -ge int2¡¡¡¡¡¡¡¡int1´óÓÚµÈÓÚint2ÎªÕæ
int1 -lt int2¡¡¡¡¡¡¡¡int1СÓÚint2ÎªÕæ
int1 -le int2¡¡¡¡¡¡¡¡int1СÓÚµÈÓÚint2ÎªÕæ
3 ÎļþµÄÅжÏ
-r file¡¡¡¡¡¡¡¡¡¡Óû§¿É¶ÁÎªÕæ
-w file¡¡¡¡¡¡¡¡¡¡Óû§¿ÉÐ´ÎªÕæ
-x file¡¡¡¡¡¡¡¡¡¡Óû§¿ÉÖ´ÐÐÎªÕæ
-f file¡¡¡¡¡¡¡¡¡¡ÎļþΪÕý¹æÎļþÎªÕæ
-d file¡¡¡¡¡¡¡¡¡¡ÎļþÎªÄ¿Â¼ÎªÕæ
-c file¡¡¡¡¡¡¡¡¡¡ÎļþΪ×Ö·ûÌØÊâÎļþÎªÕæ
-b file¡¡¡¡¡¡¡¡¡¡ÎļþΪ¿éÌØÊâÎļþÎªÕæ
-s file¡¡¡¡¡¡¡¡¡¡Îļþ´óС·Ç0Ê±ÎªÕæ
-t file¡¡¡¡¡¡¡¡¡¡µ±ÎļþÃèÊö·û(ĬÈÏΪ1)Ö¸¶¨µÄÉ豸ΪÖÕ¶ËÊ±ÎªÕæ
3 ¸´ÔÓÂß¼­ÅжÏ
-a ¡¡ ¡¡¡¡¡¡¡¡¡¡ Óë
-o¡¡¡¡¡¡¡¡¡¡¡¡¡¡ »ò
!¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡·Ç
ÓÐʱ¿´½Å±¾µÄʱºò²»ÖªµÀ¾ßÌåµÄÅжÏÊÇʲô£¬¿ÉÒԲο¼Ò»Ï¡£


Ïà¹ØÎĵµ£º

Qt for symbian»·¾³´î½¨£¨Linux£©

Programming your application or library based on Qt has always had the promise that you can deploy your application on many different platforms. Development of those applications can, likewise, happen on many different platforms. QtCreator runs on Windows, Mac & Linux among others.
QtºÜ¼òµ¥£¬Ò× ......

Linux ѧϰʹÓà iptables


ÔÚÕýʽ½éÉÜ iptables
µÄʹÓÃ
֮ǰ£¬ÎÒÃÇÏÈÀ´¿´Ò»ÏÂºÍ iptables

Ïà¹ØµÄһЩ»ù±¾¸ÅÄî¡£ÎÒÃÇÏÂÃæ½«»áƵ·±Ê¹ÓÃ
µ½
ËüÃÇ¡£
Æ¥Å䣨match£©£º·ûºÏÖ¸¶¨µÄÌõ¼þ£¬±ÈÈçÖ¸¶¨µÄ IP µØÖ·ºÍ¶Ë¿Ú¡£
¶ªÆú£¨drop£©£ºµ±Ò»¸ö°üµ½´ïʱ£¬¼òµ¥µØ¶ªÆú£¬²»×öÆäËüÈκδ¦Àí¡£
½ÓÊÜ£¨accept£©£ººÍ¶ªÆúÏà·´£¬½ÓÊÜÕâ¸ö°ü£¬ÈÃÕâ¸ö°üͨ¹ý¡£
¾ ......

LinuxÏÂMySQL5.1µÄ°²×°

×î½üÏëÔÚ·þÎñÆ÷ÉÏÊÔÊÔMySQL5.1µÄ·ÖÇø£¬ÓÚÊǾÍÏë×Å×°¸öMySQL5.1£¬¾­¹ýÍ´¿àµÄÒ»¶Î¾­Àúºó£¬ÖÕÓÚÕÒ¸öÏÂÃæ×°¸öºÜºÃµÄ½Ì³Ì£¬ÌûÉÏÀ´±¸Íü¡£
1¡¢MySQLÃâ°²×°°æ/¶þ½øÖưæÈí¼þ£¬²»ÓñàÒ룬ÏÂÔØµØÖ·£º
     http://dev.mysql.com/downloads/
     Îļþ¸ñʽ£ºMYSQL-VERSION-OS.tar.gz
2¡¢´ ......

ÓÃVNCʵÏÖÔ¶³Ì×ÀÃæ¹²Ïí(Ö§³ÖWindows, Linux, ¡­)

VNC£¬È«³ÆÎªVirtual Network Computing£¬ËüÊÇÒ»¸ö×ÀÃæ¹²Ïíϵͳ¡£ËüµÄ¹¦ÄÜ£¬ÀàËÆÓÚwindowsÖеÄÔ¶³Ì×ÀÃæ¹¦ÄÜ¡£VNCʹÓÃÁËRFB(Remote FrameBuffer£¬Ô¶³ÌÖ¡»º³å£©Ð­ÒéÀ´ÊµÏÖÔ¶³Ì¿ØÖÆÁíÍâһ̨¼ÆËã»ú¡£Ëü°Ñ¼üÅÌ¡¢Êó±ê¶¯×÷·¢Ë͵½Ô¶³Ì¼ÆËã»ú£¬²¢°ÑÔ¶³Ì¼ÆËã»úµÄÆÁÄ»·¢»Øµ½±¾µØ¡£
VNC¼¼ÊõÓëÆ½Ì¨Î޹أ¬VNC Viewer¿ÉÒÔºÍVNC ServerÔÚ²»Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ