æè¿ã®bash (3.0)ã¯ãä»ã®ããã°ã©ãã³ã°è¨èªä¸¦ã¿ã«æ£è¦è¡¨ç¾ã使ãããã¨ãåããã¾ãããã¾ãããã¡ã¤ã«ããä¸è¡ãã¤èªã¿è¾¼ãã§å¦çããè¨è¿°ãwhileå¶å¾¡æ§æã§æ¸ãããã¨ãä»åç¥ããã¨ãã§ãã¾ããã while read line; do [[ "$line" =~ "^error in (.*):[0-9]* .*$" ]] && echo "file ${BASH_REMATCH[1]}" done < input.txtæ£è¦è¡¨ç¾ã§ã¯ãã°ã«ã¼ãåã®æ¬å¼§ã¯ã¨ã¹ã±ã¼ãä¸è¦ã§ãã ãã®æ£è¦è¡¨ç¾ã®å½¢å¼ã¯ãã¼ã¸ã§ã³3ããå°å ¥ãããæ°ããæ©è½ã§ããã¾ãç¥ããã¦ããªãããã§ãã
{{#tags}}- {{label}}
{{/tags}}