Reorganise gists folder

This commit is contained in:
TKE
2022-05-13 12:49:21 +02:00
parent ecd3c7fe2f
commit acd8d616dc
98 changed files with 63 additions and 20 deletions

18
codegrab/depth Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
file="${1}"
stag="${2}"
max=0
open=0
grep -Po "</?${stag}" "${file}" | while read tag; do
if [[ "$tag" == "<${stag}" ]] ; then
(( open++ ))
else
(( open--))
fi
echo "$open - $max"
if [[ $open -gt $max ]] ; then
max=$open
fi
done