Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¡¡¡¡¡¡¡¡¡¡¡¡¡¡ »ò
!¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡·Ç
ÓÐʱ¿´½Å±¾µÄʱºò²»ÖªµÀ¾ßÌåµÄÅжÏÊÇʲô£¬¿ÉÒԲο¼Ò»Ï¡£


Ïà¹ØÎĵµ£º

CÓïÑÔ±àдlinuxϵÄÊØ»¤½ø³Ì

ÀûÓÃ
ÏÂÔØµÄÕâ¶Î´úÂ룬³É¹¦ÊµÏÖÁËÊØ»¤½ø³Ì£¬Ô­À´ÊØ»¤½ø³ÌÊǺܼòµ¥µÄÊÂÇé¡£
¡¡¡¡ÔÚmainº¯ÊýÖÐÖ´ÐÐ
¡¡¡¡init_daemon();//³õʼ»¯ÎªDaemon
¡¡¡¡¾Í¿ÉÒ԰ѽø³Ì±ä³ÉÊØ»¤½ø³Ì
¡¡¡¡
#include
#include
#include
#include
#include
void
 init_daemon(void
)
{
int
 pid;
int
 i;
if
(pid=fork()) ......

Linux ¸÷Ä£¿é¼Ü¹¹Í¼


 
  Resources on the site
• Interactive map of GNU/Linux OS and FOSS
• "GNU/Linux is my home" - map of GNU/Linux system
• Interactive map of Linux kernel
• Linux inside
• Linux Technology Reference (single page view)
• Linux kernel diagram
• Li ......

linuxЭÒéÕ»Ö®Á´Â·²ãÉϵÄÊý¾Ý´«ÊäÖ®Íø¿¨Çý¶¯

ÎÄÕÂÀ´Ô´£ºhttp://blog.chinaunix.net/u1/51562/showart_405963.html
http://ericxiao.cublog.cn/¶ÔÄÚºËÔ´Âë·ÖÎöµÄ±È½ÏÏêϸ£¬¸ÐлÎÄÕÂ×÷ÕßÎÞ˽·îÏ×
±¾ÎÄ»¶Ó­×ªÔØ!
×ªÔØÇë×¢Ã÷³ö´¦:http://ericxiao.cublog.cn/
------------------------------------------
<<prison break>>µÚÈý¼¾µÄµÚÎ弯£¬ÖÕÓÚÔÚÇÌÊׯóÅÎ ......

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ºÜ¼òµ¥£¬Ò× ......

ÓÃ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ºÅ