2016-06-24 正規表現マッチング bash line="#comment" # 正規表現を"で囲んではいけないため、\でエスケープさせる必要が有る if [[ $line =~ \#comment ]]; then echo $line fi