ºìÁªLinuxÃÅ»§
Linux°ïÖú

Shell×Ô´øµÄÌØÊâ±äÁ¿

·¢²¼Ê±¼ä:2012-06-19 10:57:41À´Ô´:ºìÁª×÷Õß:empast
$PATH:¿ÉÖ´ÐÐÎļþµÄËÑË÷·¾¶, Ò»°ãΪ/usr/bin/,/usr/X11R6/bin/, /usr/local/bin, µÈµÈ

$PWD:¹¤×÷Ŀ¼(Ä㵱ǰËùÔÚµÄĿ¼)

$UID:Óû§IDºÅ

$SHLVL:Shell¼¶±ð, ¾ÍÊÇBash±»Ç¶Ì×µÄÉî¶È. Èç¹ûÊÇÔÚÃüÁîÐÐÖÐ, ÄÇô$SHLVLΪ1, Èç¹ûÔڽű¾ÖÐÄÇô$SHLVLΪ2.

$SECONDS:Õâ¸ö½Å±¾ÒѾ­ÔËÐеÄʱ¼ä(ÒÔÃëΪµ¥Î»).

$IFS:ÄÚ²¿Óò·Ö¸ô·û,Õâ¸ö±äÁ¿ÓÃÀ´¾ö¶¨BashÔÚ½âÊÍ×Ö·û´®Ê±ÈçºÎʶ±ðÓò, »òÕßµ¥´Ê±ß½ç.

$IFSĬÈÏΪ¿Õ°×(¿Õ¸ñ, ÖƱí·û,ºÍ»»Ðзû), µ«ÕâÊÇ¿ÉÒÔÐ޸ĵÄ, ±ÈÈç, ÔÚ·ÖÎö¶ººÅ·Ö¸ôµÄÊý¾ÝÎļþʱ, ¾Í¿ÉÒÔÉèÖÃΪ¶ººÅ. ×¢Òâ$*ʹÓõÄÊDZ£´æÔÚ$IFSÖеĵÚÒ»¸ö×Ö·û.

$0, $1, $2,..$9:λÖòÎÊý, ´ÓÃüÁîÐд«µÝµ½½Å±¾, »òÕß´«µÝ¸øº¯Êý,»òÕßset¸ø±äÁ¿

$#:ÃüÁîÐвÎÊý »òÕßλÖòÎÊýµÄ¸öÊý

$*:ËùÓеÄλÖòÎÊý¶¼±»¿´×÷Ϊһ¸öµ¥´Ê.

$?:ÃüÁî, º¯Êý, »òÕßÊǽű¾±¾ÉíµÄÍ˳ö״̬Âë(³É¹¦Îª0)

$$:½Å±¾×ÔÉíµÄ½ø³ÌID

$!:ÔËÐÐÔÚºǫ́µÄ×îºóÒ»¸ö×÷ÒµµÄPID(½ø³ÌID)
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 4 ÌõÆÀÂÛ

  1. a41256198 ÓÚ 2012-07-19 20:49:38·¢±í:

    shlvl command not found

  2. 942736590 ÓÚ 2012-06-28 17:41:43·¢±í:

    лл¥Ö÷·ÖÏí

  3. honglianqxw123 ÓÚ 2012-06-28 15:44:55·¢±í:

    ·¹ý£¬Á˽⣬ѧϰ¡£
    лл¸÷λ¡£

  4. laughtianxia ÓÚ 2012-06-26 19:04:34·¢±í:

    £¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿