次ã®2ã¤ã®ã¹ã¯ãªããã¯åãã«è¦ããã #!/usr/bin/env python import os for i in xrange(100): cmd = "tail -f /var/log/syslog | cat " os.system(cmd) #!/usr/bin/env python import subprocess for i in xrange(100): cmd = "tail -f /var/log/syslog | cat " subprocess.call(cmd, shell=True) ã¿ã¤ãæ°ãå°ãªãååè ã®ã»ããè¯ãããã«è¦ããã ã§ãããã®ã¹ã¯ãªãããæ¢ãããã¨ãã¦Ctrl-Cãæ¼ãã¨ãåè ã¯ãã®ã¾ã¾æ¬¡ã®ã«ã¼ããå®è¡ããã¦ãã¾ãã®ã«å¯¾ãã¦ãå¾è ã¯ä¾å¤ãåºãã¦æ¢ã¾ã£ã¦ãããã ã·ã°ãã«ã«ããçµäºã¨ã¯å¥ã«ãçµäºã³ã¼ãã0ã§ç¡ãã£ãå ´åã«ãä¾å¤ãåºãã¦ããã
{{#tags}}- {{label}}
{{/tags}}