2008å¹´05æ26æ¥02:30 ã«ãã´ãªä¸æ¥ä¸è¡ééTips perl - tac ãä¸è¡ã§ ããã£ã¦one-linerã§ã [ã] ãããã®ã¬ã³ã¿ã«ãµã¼ãã« tac ã³ãã³ããå ¥ãã UNIX ç³»ã®ã³ãã³ãã§ãtac ã¨ããã®ãããã便å©ãªã®ã§ãã ããã¯ãã¡ã¤ã«ãå é ãã表示ãã cat ã¨ããã³ãã³ãã®éã§ã ãã¡ã¤ã«ãè¡åä½ã§ã²ã£ããè¿ãã¦æ«å°¾ãã表示ãã¦ãããã®ã§ãã% perl -e 'print reverse <>' ãã ãããã®ããæ¹ã¯ä¸ç«¯ã¡ã¢ãªã¼ã«å ¨ãã¡ã¤ã«ãèªã¿è¾¼ãã®ã§éå¹çã¨ããã°éå¹çã以ä¸ã®ããã«ããã°ããå°ãå¹ççã«ãªãã¾ããã #!/usr/local/bin/perl use strict; use warnings; @ARGV or die "$0 [files...]"; for my $filename ( reverse @ARGV ) { o
{{#tags}}- {{label}}
{{/tags}}