#!/bin/bash CURRENT_PATH="$PWD" GIT_PATH="$(git rev-parse --show-toplevel)" cd $GIT_PATH GIT_PATH="$PWD" IFS=$'\n' FILES=($(git ls-files . --ignored --exclude-standard --others)) cnt=${#FILES[@]} for ((i=0;i