Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ã¡ãã£ã¨ãããã¡ã¤ã«ãä½æã»ä¿åãã¦ããããæãèªåã«ã¨ã£ã¦ã¯ãä»æ¥ã®æ¥ä»ã®ãã£ã¬ã¯ããªãã«ã¾ã¨ãã¦ããã®ãä¸åº¦ãããããã¾ã§ã¯æ¯æ¥æä½æ¥ã§ãä»æ¥ã®æ¥ä»ã®ãã£ã¬ã¯ããªããä½æã»ç§»åãã¦ããã®ã ãã©ããããæ¯åããã®ãé¢åèããã¨ãããã¨ã§ã¹ã¯ãªããã§èªååãããã¡ãªã¿ã«ç°å¢ã¯ruby1.9.2ãbash 3.2.48ã â»è¿½è¨ ãã³ã¡ã§ãææããã ããéããRuby使ããªãã§Bashã ãã§ã§ãã¾ã...ãªãããããRubyã使ã£ãã®ã...ããã«Rubyããã£ãããã§ã... æ©è½ ã»ã·ã§ã«ã§ã. todayãã¨å ¥åããã¨ã~/daily/ä»æ¥ã®æ¥ä»ï¼yyyy_mm_ddï¼ããã£ã¬ã¯ããªãä½æã移åãã å®è£ ã«ããã£ã¦ Rubyã§ãã£ã¬ã¯ããªãä½ãã®ã¯ç°¡åãªã®ã ããç¾å¨ã®ã·ã§ã«ã移åããã®ã«ä¸å·¥å¤«å¿ è¦ã ã£ããRubyã§Dir.chdirããã ãã§ã¯ãç¾å¨ã®ã·ã§ã«ã®ãã£ã¬ã¯ããªã¯ç§»åããªãï¼
åããã¡ã¤ã«ãé£çªã§æ¬²ããã£ãã æ®éããã¾ããªãã·ãã¥ã¨ã¼ã·ã§ã³ããã test.shã¨ããã®ãä½ã£ãã å®è¡æ¨©éä¸ããã¨ããããããã¿ã¼ããã«ã§è©²å½ãã£ã¬ã¯ããªã¾ã§ç§»åã㦠chmod u+x test.sh test.shã®ä¸èº«ã¯ãä¸è¨ã®éã #!/bin/sh number=1 while test $number -le 10 do cp hoge_0.png hoge_$number.png number=`expr $number + 1` done hoge_0.pngãåºã«ãã¦hoge_1.pngããhoge_10.pngã¾ã§ã³ãã¼ãã¦ãããã¯ãã
ã¯ã±ãã£ã¦ããããã°ãããã¹ã¯ãªãããã¨æ ¼éãã¦ãããï¼OS Xã®Finderã§ï¼ããã«ã¯ãªãã¯ãã¦èµ·åã§ããã°OKãYesï¼Noã¬ãã«ã®ç¢ºèªãã¨ãããã¤ã¢ãã°ã表示ã§ããã°ãªããããã¨ããæ¡ä»¶ã¯ã¤ãããå 容ã¯ã·ã§ã«ã¹ã¯ãªããã§ãAppleScriptã§ããPerlã§ãPythonã§ãæ§ããªããä½è£ãæ´ã£ã¦ãã¦çµæãåºããã°æ¯éãªããã¨ãããã®ã ã ãå¯ãã®ã¨ãããã¹ã¯ãªããã¯éèªåãã®è¨äºä¸ã§ä½¿ç¨ããããã®ãã¼ã§ãæ°è»½ã«ä½¿ãããããããã°ã©ãã³ã°ã®ç¥èãå¿ è¦ãªããéããªãå 容ãåç´åãããã®ãçæ³çã ãå®è¡ã«è³ãã¾ã§ã®æºåã極åæ¸ãããããããã«ãããã«ã¯ãªãã¯ãã¦èµ·åã絶対æ¡ä»¶ã¨ãªã£ã¦ããã ãã®ã¨ãæ©ã¾ããã®ãããã¼ããã·ã§ã³ãããã¡ã¤ã«ã®å½¢ã§é å¸ããã¨ããªã«ãã®æåã«ãã¼ããã·ã§ã³ãå¤ãã¦ãã¾ããã¨ãããã®ã ãé常ã§ããã°ããchmod +x ãããå®è¡ãã¹ããã¨ãã£ãæ å ±ãä»ãã
ã¯ã±ãã£ã¦ãã·ã§ã«ã¹ã¯ãªããã«ä½¿ããã¬ã¯ãã®æ å ±ãæ´çãã¦ãããå©ç¨ç°å¢ã¯Snow Leopardéå®ããããUNIXã®æµåã«ä¸æ £ããªå±¤ã«é æ ®ããã°ãªãããã©ããããã®ãã¨ãç°¡æ½ãã¤å®ç¨çã«ããããæ±ããããå½¢ã模索ãã¦ããã®ã ã ãªã¼ã½ããã¯ã¹ãªå½¢ã¯ããã¯ããããã«ã¯ãªãã¯ã«å¯¾å¿ãããããã¨ã ãããå®è¡å±æ§ï¼chmod + x ï½ï¼ãä¸ããããã§ãæ¡å¼µåãä¸è¬çãªã.shãã¨ããTerminalã«é¢é£ä»ããããã.commandãã«ãã¦ããã°ãããã«ã¯ãªãã¯ã§Terminalã®èµ·åããã·ã§ã«ã¹ã¯ãªããã®å®è¡ã¾ã§ãå¦çãããã¡ã¤ã«ã¨ãªããç¹å¥ãªæºåãå¿ è¦ãªããã¨ãå©ç¹ã ããè¦æ ãããç®ç«ããªããã¨ã¯æ¬ ç¹ã¨ããããããããªãã Automatorã¨ããæããããã·ã§ã«ã¹ã¯ãªããã¤ã³ã¿ã¼ããªã¿ã¨ãã¦æ©è½ãããã·ã§ã«ã¹ã¯ãªãããå®è¡ãã¢ã¯ã·ã§ã³ãå©ç¨ããã°ãä»ã®ã¢ã¯ã·ã§ã³ãããã¡ã¤ã«ãªã©ãå¼æ°ã¨
ãµã¼ãã¹çµäºã®ãç¥ãã ãã¤ãYahoo! JAPANã®ãµã¼ãã¹ããå©ç¨ããã ãèª ã«ãããã¨ããããã¾ãã ã客æ§ãã¢ã¯ã»ã¹ããããµã¼ãã¹ã¯æ¬æ¥ã¾ã§ã«ãµã¼ãã¹ãçµäºãããã¾ããã ä»å¾ã¨ãYahoo! JAPANã®ãµã¼ãã¹ããæ顧ãã ããã¾ãããããããããé¡ããããã¾ãã
ãã¤ãããã使ãæã«ãªã£ã¦ãã©ããããã ã£ãï¼ã¨æ¢ãåã£ã¦ãã¾ãã®ã§ãå¿ããªãããã«ã¡ã¢ãï¼ä»¥åã®æ¥è¨ã§ããæã åæ£ãã¦æ¸ãã¦ãããããããªãããããã§ç·æ¬çã«è¨é²ãããã¨ã«ããï¼ ã·ã§ã«ã¹ã¯ãªãã $ fpath='/a/b/c.d.e' # ãã¡ã¤ã«åãåãåºãï¼æ¡å¼µåããï¼ $ fname_ext="${fpath##*/}" $ echo $fname_ext c.d.e # ãã¡ã¤ã«åãåãåºãï¼æ¡å¼µåãªãï¼ $ fname="${fname_ext%.*}" $ echo $fname c.d # æ¡å¼µåãåãåºã $ fext="${fpath##*.}" $ echo $fext e # ãã£ã¬ã¯ããªãåãåºã $ fdir="${fpath%/*}" $ echo $fdir /a/b ãªãã»ã©ï¼ ããã¦ãä»çµã¿ã¨ãã¦ã¯ã以ä¸ã®ã«ã¼ã«ãããã£ã¦å¤æããã¦ããããã ã ${
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}