Last active
May 6, 2025 15:47
-
-
Save MrChrisWeinert/ba55c3b9fe845ea30c164e11479f746f to your computer and use it in GitHub Desktop.
Revisions
-
MrChrisWeinert renamed this gist
May 6, 2025 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,11 @@ for filename in `find ./ | grep 'md$'`; do grep -L tags $filename; done #WITH tags for filename in `find ./ | grep 'md$'`; do grep -l tags $filename; done #Find in all files: find ./ -exec grep 'Critical' /dev/null {} \; | tee ~/grepResults.txt #Update hostname hostnamectl set-hostname new-hostname -
MrChrisWeinert revised this gist
Nov 5, 2024 . 1 changed file with 60 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,63 @@ for filename in `find ./ | grep 'md$'`; do grep -L tags $filename; done #WITH tags for filename in `find ./ | grep 'md$'`; do grep -l tags $filename; done Find in all files: find ./ -exec grep 'Critical' /dev/null {} \; | tee ~/grepResults.txt #Progress Bar (untested) #!/bin/bash ### Reports file1="example.csv" #################### ### Progress Bar ### #################### progress_bar_setup() { total_lines=$(wc -l < "$1") progress=0 echo -n "[--------------------] 0% " } progress_bar() { let progress++ let filled_slots=progress*20/total_lines bar="" for ((i=0; i<$filled_slots; i++)); do bar="${bar}#" done for ((i=filled_slots; i<20; i++)); do bar="${bar}-" done let percentage=progress*100/total_lines echo -ne "\r[${bar}] ${percentage}% " } progress_bar_complete() { bar="####################" echo -ne "\r[${bar}] 100% " echo;echo } ################## ### While Loop ### ################## echo "Progress Bar Title::" progress_bar_setup $file1 cat $file1 | while read line; do # Task progress_bar done progress_bar_complete -
MrChrisWeinert created this gist
Nov 5, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #bin/bash #This will list out all the .md files that DON'T contain 'tags' for filename in `find ./ | grep 'md$'`; do grep -L tags $filename; done #WITH tags for filename in `find ./ | grep 'md$'`; do grep -l tags $filename; done