é常ãã®åéã«ãããã¯ã³ã©ã¤ãã¼ï¼one-linerï¼ã¨ã¯ããã¤ãï¼|ï¼ã¨ããæ©è½ãç¨ãã¦è¤æ°ã®ã³ãã³ãã1è¡ã«ã¾ã¨ãããã®ãæå³ããããã¤ãã®æ©è½ã¯ããã®å·¦å´ã«è¨è¿°ãããã³ãã³ãã®å®è¡çµæããå³å´ã«è¨è¿°ãããã³ãã³ãã®å ¥åã¨ãã¦æ¸¡ããã¨ã§ãããæ¬ç¨¿ã§è§£èª¬ããã®ã¯bashã³ãã³ãããã³ããã§ã®ä½¿ç¨ä¾ã ããç°¡åãªæ§æã®ã¯ã³ã©ã¤ãã¼ã«ããè¤éãªæ§æã®ã¯ã³ã©ã¤ãã¼ã«ããããããã¯ãããã使ãæ¹æ¬¡ç¬¬ã§å¤§ãã«å½¹ç«ã¤åå¨ãªã®ã ã ä¾ãã°ãã«ã¬ã³ãã®ãã£ã¬ã¯ããªã«ä½åã®ãã¡ã¤ã«ãç½®ããã¦ãããã確èªããã«ã¯ãä¸è¨ã®ã³ãã³ããå®è¡ããã°ããã ls | wc -l ããã¯æãç°¡åãªé¨é¡ã«å±ãã¯ã³ã©ã¤ãã¼ã®ãµã³ãã«ã§ãã£ã¦ãç¶æ³ã«ãã£ã¦ã¯ããè¤éãªè¨è¿°ããããã¨ã«ãªããä¾ãã°ãæå ã®ã·ã¹ãã ã«ã¦å®è¡ä¸ã®ããã»ã¹ã®ãã¡ã§CPUæéãæ大éã«æ¶è²»ãã¦ãããã®ä¸ä½5ã¤ãç¹å®ããã«ã¯ãä¸è¨ã®ã³ãã³ããå®è¡ããã°ãã
iostat -x ã® %util ãç£è¦ãã¦ãããå¤ãè¶ ãããã¢ã©ã¼ãã¡ã¼ã«é£ã°ããããªãã¨æã£ã¦ crontab æ¸ããããããªæãã */5 * * * * perl -wle 'my $s = `/usr/bin/iostat -xk /dev/sd[abc] 270 2 | tail -4`; print $s if $s =~ m{\s(?:[0-9]{3}|[5-9][0-9])\.[0-9]+$}m'ãã¤ã³ãã¯ã iostat ã®å¾ãããï¼ã¤ç®ã®å¼æ°ããµã³ããªã³ã°ãè¡ãç§æ° tail 㧠ããã¤ã¹æ°+1 ãããã¨ã§ãæå¾ã®ãµã³ãã«ãåãåºã æ£è¦è¡¨ç¾ã§50%以ä¸ã ã£ãå ´åã«æ¨æºåºåã« iostat ã®çµæãåºãï¼ã¡ã¼ã«éä¿¡
2008å¹´03æ30æ¥19:45 ã«ãã´ãªLightweight Languagesä¸æ¥ä¸è¡éé perl - ã¯ã³ã©ã¤ãã¼ã®æ¸ãæ¹å ¥é ã¾ããruby ã®ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã£ã¦ãPerlç±æ¥ã§ãããã Rubyã§ã¯ã³ã©ã¤ãã¼ãæ¸ãæ¹æ³ã®ã¾ã¨ã ã¾ããPerlããããããã¾ãéè¦ãç¡ãã®ããç¥ãã¾ãããã ã¨ããããã§ãRubyistã«ãå½¹ç«ã¤Perlã®ã¯ã³ã©ã¤ãã¼å ¥éã§ãã åºæ¬ä¸ã®åºæ¬ ã³ãã³ãã¨ãã¦ã®perlã¯ãã¹ã¤ããããªãå ´åãå¼æ°ã¯ã¹ã¯ãªããåã¨ãã¦æ±ããã¾ãã % cat hello.pl print "Hello, world!\n"; % perl hello.pl Hello, world! % ã³ãã³ãã©ã¤ã³ä¸ã®æååãã¹ã¯ãªããã¨ãã¦è§£éãããã«ã¯ã-eã使ãã¾ãã % perl -e 'print "Hello, World!\n"' Hello, worl
Perlçã®LLã§ã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ãµã¼ããæ¸ãã¦ããã¨ãæ®éã¯ãã«ãããã»ã¹ã¢ãã« (apache ãªã prefork ã¨ã) ã§éç¨ãããã¨ã«ãªãã¨æããã§ãããããã©ãã ãã¡ã¢ãªã使ã£ã¦ããããã£ã¦ããã®ã¯ãã¥ã¼ãã³ã°ã«ããã¦éè¦ã«ãªã£ã¦ããããã (ããããªããã¨æã) ãã©ãããããã¡ã¢ãªã®ç·ä½¿ç¨éãã©ããã£ã¦æ¸¬å®ããã®ãã 20:20追è¨: PSSã使ã£ã¦ã¯ã³ã©ã¤ãã¼ã§æ¸¬å®ããã®ãç°¡å (ã³ã¡ã³ãæ¬åç §)ãkosakiãããããã¨ããããã¾ãã $ sudo perl -le 'for my $p (@ARGV) { open my $fh, "< /proc/$p/smaps" or die $!; map { /^Pss:\s*(\d+)/i and $s += $1 } <$fh> } print $s' `pgrep plackup` 914325以ä¸ã¯ååæ稿æ
Landscape ããããã¼ã¸ | < åã®æ¥ 2003-06-03 2003-06-04 次ã®æ¥ 2003-06-05 > Landscape - ã¨ã³ã¸ãã¢ã®ã¡ã¢Â 2003-06-04 Perl one liner é perl 1è¡éé å½ãµã¤ãå ã Google æ¤ç´¢ã§ãã¾ã * Perl one liner é perl 1è¡ééãã®è¨äºã®ç´ãªã³ã¯URL: Permlink | ãã®è¨äºãå±ããã«ãã´ãª: [Perl] - one linerãæ¥æ¬èªã§è¨ãã¨ä¸è¡ééããããä¸è¡ã¹ã¯ãªããã解説ãããã¼ã¸ã æã¯ããåç §ãã¦ãããgoogle ããããæ¢ãã¦ãè¦ã¤ãããªãã ä»æ¹ããªãã®ã§ãããã«è»¢è¼ãã¦ããã - Internet Archive ã§è¦ã¤ããããperl ã§ãããã ã¨ãããã¼ã¸ã®ä¸ã³ã¼ãã¼ã ã£ãããã ã http://web.archive.org/web/2
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
æ¥é ãã楽天ã®ãµã¼ãã¹ããå©ç¨ããã ãã¾ãã¦ãããã¨ããããã¾ãã ãµã¼ãã¹ããå©ç¨ããã ãã¦ããã¾ãã¨ãã大å¤ç³ã訳ãããã¾ããããç¾å¨ãç·æ¥ã¡ã³ããã³ã¹ãè¡ããã¦ããã ãã¦ããã¾ãã ã客æ§ã«ã¯ãç·æ¥ã®ã¡ã³ããã³ã¹ã«ããããè¿·æãããããã¦ãããèª ã«ç³ã訳ãããã¾ããã ã¡ã³ããã³ã¹ãçµäºæ¬¡ç¬¬ããµã¼ãã¹ã復æ§ãããã¾ãã®ã§ã ä»ãã°ãããå¾ ã¡ããã ãã¾ãããããé¡ãç³ãä¸ãã¾ãã
Kazuho@Cybozu Labs: C - a pseudo-interpreter of the C programming language Perl ã Ruby ã§ã¯ãã¯ã³ã©ã¤ãã¼ã§å¦çãæ¸ãã¦ä¾¿å©ã§ããã§ãããªãã C ã§ã¯æ¸ããã¨ãã§ãã¾ãããä»äºä¸ã®é½åã§ãå°ããªå¦çã C è¨èªã§æ¸ãå¿ è¦ããã£ãã®ã§ãã¯ã³ã©ã¤ãã¼ãæ¸ããã¨ã®ã§ãã C è¨èªã®ã¤ã³ã¿ããªã¿(?)ãä½ã£ã¦ã¿ã¾ããã é¢ç½ãããªã®ã§ãæ©éRPMããã±ã¼ã¸ãä½ã£ã¦ã¿ã¾ããã Red Hatç³»Linuxãªãã¤ã³ã¹ãã¼ã«ã¯ä»¥ä¸ã®ã³ãã³ãä¸çºã§ãã # rpm -ivh http://takesako.31tools.com/redhat/RPMS/noarch/C-0.01-0.noarch.rpm ãããªãã¨ãã§ããããã«ãªãã¾ãã [1] Cè¨èªã§ã¯ã³ã©ã¤ãã¼ï¼ C -e 'printf("hello worl
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}