Linux ã·ã§ã« (sh) ã§ãæååããä»»æã®æåãåãåºãæ¹æ³ã¨ãã¦ã¯ãå¤é¨ã³ãã³ã sed ãå©ç¨ããæ¹æ³ãããã¾ãã æ¹æ³ã¨ãã¦ã¯ãsed ã³ãã³ãã® -e ãªãã·ã§ã³ã使ã£ã¦æ£è¦è¡¨ç¾ã使ç¨ãã¦ãå¿ è¦ãªæååã«ç½®ãæããã¨ããæ¹æ³ãã¨ãã¾ããsed ã«æ¸¡ãæåå㯠echo ã³ãã³ãã使ã£ã¦æ¸¡ãã¾ãã DATA1="IP Address: 192.168.0.1/255.255.255.0 RETVAL=`echo "$DATA1" | sed -e "s/^IP Address:[ \t]\+\([0-9\.]\+\)\/[0-9\.]\+$/\1/g"` ãã®ããã«ãããã¨ã§ãDATA1 ãã "192.168.0.1" ã®é¨åãåãåã£ã¦ RETVAL å¤æ°ã«åå¾ãããã¨ãå¯è½ã«ãªãã¾ãã ä»ã«ããã¨ãã°ã次ã®ãããªæ½åºããsed ã使ã£ã¦ã§ããã¨æãã¾ãã
{{#tags}}- {{label}}
{{/tags}}