#!/bin/bash

for i in `ls *.html` ; do
    echo "---------------------------------------------------------"
    echo ""
    echo "|--- in $i"
    echo "|"
    slash_bracket_num=`cat $i | grep "/\[" | wc -l`
    slash_bracket_example=`cat $i | grep "/\[" | head -n 3`
    echo "/[ amount: $slash_bracket_num"
    echo "/[ examples:"
    echo "$slash_bracket_example"
    echo ""
    VAR="\\\\"
    backslash_bracket_num=`cat $i | grep "${VAR}\[" | wc -l`
    backslash_bracket_example=`cat $i | grep "${VAR}\[" | head -n 3`
    echo "\\[ amount: $backslash_bracket_num"
    echo "\\[ examples:"
    echo "$backslash_bracket_example"
    echo ""
    
done