#!/bin/bash #ignore .txt files in find find . -size +50M ! -name '*.txt' | sed 's/\.\///g' > .gitignore list=( "*.txt" "test/*" "*#" #ods-tmp-files *skyglow.log __pycache__ ) for i in "${list[@]}" do echo "$i" >> .gitignore done