Změna mezer na tabulátory
This commit is contained in:
parent
2d93984872
commit
1a207a47fe
24 changed files with 2034 additions and 2017 deletions
17
convert_spaces_to_tabs.sh
Executable file
17
convert_spaces_to_tabs.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test "$#" -lt 1
|
||||||
|
then
|
||||||
|
echo "Usage: $0 file ..."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
for file in "$@"
|
||||||
|
do
|
||||||
|
# Do the sed magic: keep replacing 4 spaces at the begining of line
|
||||||
|
sed -i -re '
|
||||||
|
: loop
|
||||||
|
s/^( *) /\1 /
|
||||||
|
t loop
|
||||||
|
' "$file"
|
||||||
|
done
|
Loading…
Reference in a new issue