add bin/find_crlf (shell script to find CRLF line endings)
This commit is contained in:
parent
b1a554d913
commit
734946a7ab
1 changed files with 16 additions and 0 deletions
16
bin/find_crlf
Executable file
16
bin/find_crlf
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
EXCLUDES=(
|
||||||
|
"*/node_modules/*"
|
||||||
|
"*/.git/*"
|
||||||
|
"*/__pycache__/*"
|
||||||
|
)
|
||||||
|
|
||||||
|
EXCLUDE_PARAMS=()
|
||||||
|
|
||||||
|
for path in "${EXCLUDES[@]}"; do
|
||||||
|
EXCLUDE_PARAMS+=("-not" "-path" "$path")
|
||||||
|
done
|
||||||
|
|
||||||
|
find . -type f "${EXCLUDE_PARAMS[@]}" -exec file '{}' \; | grep 'CRLF'
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue