Naive replace-tabs
This commit is contained in:
parent
e00f179ca7
commit
fdcb232983
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Replaces the tabs by spaces in the current directory.
|
||||
|
||||
for file in *; do
|
||||
file $file | grep text 2>&1 > /dev/null
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
# It is a text file, perform the replace
|
||||
sed -i 's/\t/ /g' $file
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue