Ruby ã®ã¯ã³ã©ã¤ãã¼ã«ã¤ãã¦ãæ¸ãã¦ããã¾ãã ã¯ã³ã©ã¤ãã¼ã使ã㨠ã¯ã³ã©ã¤ãã¼ã使ãã¨ãç½®æãåºåå¦çãã¨ã£ã¦ã便å©ã«ãªãã¾ãã ruby -ne '$_.gsub!(/takuya/,"takuya_1st")' -i my_blog.txt ä»å使ããµã³ãã«ãã¡ã¤ã« ã¯ããã«æ¬¡ã®ãããªãã¡ã¤ã«ãç¨æãã¾ãããããããã¯ãã®ãµã³ãã«ã使ãã¾ã ã³ã¼ãã»ãã©ããã¼ã 420 ãã¼ã¯ã¢ã«ããããã©ããã¼ã 490 æ¹è¶ã¯ãªã¼ã ãã©ããã¼ã 470 ããã©ã¯ãªã¼ã ãã©ããã¼ã 470 åºæ¬ã® -e ãªãã·ã§ã³ åºæ¬ã®-eãªãã·ã§ã³ã§ããruby ã¹ã¯ãªãããç´æ¥æå®ããæ¹æ³ã§ãã takuya@air:~/Desktop$ ruby -e 'puts ARGF.read' test.txt ã³ã¼ãã»ãã©ããã¼ã 420 ãã¼ã¯ã¢ã«ããããã©ããã¼ã 490 æ¹è¶ã¯ãªã¼ã ãã©ããã¼ã 4
{{#tags}}- {{label}}
{{/tags}}