tree --dirsfirst --noreport -I README.md |
sed '1s/^/```'"$(printf '\n')"'/;$s/$/'"$(printf '\n')"'```/' > README.md
If tree is not available, install it via
brew install tree
#!/bin/bash | |
# Function to check if leap year exists in order to print exact year number | |
function is_leap { | |
if !(($1 % 4)) && ( (($1 % 100)) || !(($1 % 400)) ); then | |
echo 1 | |
else | |
echo 0 | |
fi | |
} |
tree --dirsfirst --noreport -I README.md |
sed '1s/^/```'"$(printf '\n')"'/;$s/$/'"$(printf '\n')"'```/' > README.md
If tree is not available, install it via
brew install tree