data.xxxµÄ×÷ÓÃÊÇÒ»ÑùµÄ£¬µ«ÊDz»»á²úÉúнø³Ì£¬ÒòΪðºÅ£ºÊÇÒ»¸öÄÚ½¨ÃüÁî¡£ " />
ºìÁªLinuxÃÅ»§
Linux°ïÖú

Linux ϵͳѧϰ֮shell½Å±¾Ñ§Ï°

·¢²¼Ê±¼ä:2008-05-30 21:29:04À´Ô´:ºìÁª×÷Õß:Desktop
1¡¢£º£¨Ã°ºÅµÄÃîÓã©

: ${username=`whoami`} #µ±×÷ռλ·û
: ${HOSTNAME?} ${USER?} ${MAIL?} #ÆÀ¹À²ÎÊýÊÇ·ñÉèÖÃ
: > data.xxx #Îļþ"data.xxx"ÏÖÔÚ±»Çå¿ÕÁË£¬Õâ¸öºÍ cat /dev/null > data.xxxµÄ×÷ÓÃÊÇÒ»ÑùµÄ£¬µ«ÊDz»»á²úÉúнø³Ì£¬ÒòΪðºÅ£ºÊÇÒ»¸öÄÚ½¨ÃüÁî¡£

2¡¢ ** ÊÇÃÝÔËËã

3¡¢$? Í˳ö״̬±äÁ¿.$?±£´æÒ»¸öÃüÁî/Ò»¸öº¯Êý»òÕ߽ű¾±¾ÉíµÄÍ˳ö״̬¡£

$$ ½ø³ÌID ±äÁ¿.Õâ¸ö$$±äÁ¿±£´æÔËÐнű¾½ø³ÌID

4¡¢´óÀ¨ºÅ {xxx,yyy,zzz...}

´óÀ¨ºÅÀ©Õ¹,Èç:
cat {file1,file2,file3} > combined_file
# °Ñfile1,file2,file3 Á¬½ÓÔÚÒ»Æð,²¢ÇÒÖض¨Ïòµ½combined_file ÖÐ.
cp file22.{txt,backup} # ¿½±´"file22.txt" µ½"file22.backup"ÖÐ

echo {file1,file2}\ :{\ A," B",' C'}
#Êä³öfile1 : A file1 : B file1 : C file2 : A file2 : B file2 : C

´óÀ¨ºÅ´ú±í´úÂë¿é£¬µ«ÊÇÆäÖеıäÁ¿ÊÇ¿ÉÒÔ±»ÍâÃæ¿´µ½µÄ¡£¶øСÀ¨ºÅÖеıäÁ¿ÓëÍâ½çÎ޹ء£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 8 ÌõÆÀÂÛ

  1. zguangyu0000 ÓÚ 2010-05-29 14:54:00·¢±í:

    ¶¥°¡£¡£¡

  2. axbyc123 ÓÚ 2010-05-27 08:00:48·¢±í:

    7# justone
    ͬÒâ¡£¡£¡£

  3. justone ÓÚ 2010-05-22 02:16:22·¢±í:

    ϸ΢֮´¦·½ÏÔÕ湦·ò°¡£¡

  4. ¾øÃÜ·ÉÐÐ ÓÚ 2010-05-21 16:22:12·¢±í:

    ¶¥Ò»¸ö°¡£¬ºÙºÙ

  5. ¾øÃÜ·ÉÐÐ ÓÚ 2010-05-21 16:22:08·¢±í:

    ¶¥Ò»¸ö°¡£¬ºÙºÙ

  6. shanke ÓÚ 2010-05-17 11:17:26·¢±í:

    ¶¥ good~~~²»¶ÏŬÁ¦

  7. sherwinwang ÓÚ 2009-12-24 23:45:22·¢±í:

    thanks for sharing!

  8. guocuily ÓÚ 2009-11-30 18:10:27·¢±í:

    ¶¥Ò»Ï¡¢¡¢