dotfiles/bin/replace-tabs

13 lines
263 B
Plaintext
Raw Normal View History

2020-02-12 10:57:39 +01:00
#!/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