This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
fuss:sh [2020/03/30 05:18] – [For ZIP] office | fuss:sh [2021/05/17 05:44] – [Find Plaintext Files] office | ||
---|---|---|---|
Line 808: | Line 808: | ||
* '' | * '' | ||
+ | ====== Find Plaintext Files ====== | ||
+ | |||
+ | <code bash> | ||
+ | find . -type f -exec grep -Iq . {} \; -print | ||
+ | </ | ||
+ | |||
+ | ====== Ensure Newline at End of File ====== | ||
+ | |||
+ | <code bash> | ||
+ | find -name \*.txt | while read f; do tail -n1 $f | read -r _ || echo >> $f; done | ||
+ | </ | ||
+ | where: | ||
+ | * '' |