File: fix_tab

package info (click to toggle)
maxima 5.21.1-2squeeze
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 94,928 kB
  • ctags: 43,849
  • sloc: lisp: 298,974; fortran: 14,666; perl: 14,325; tcl: 10,494; sh: 4,052; makefile: 2,975; ansic: 471; awk: 24; sed: 7
file content (14 lines) | stat: -rwxr-xr-x 254 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

pattern=`printf "\t"`
bad_files=`find . -name '*.texi' -print | xargs grep -l -e "$pattern"`

[[ "x$bad_files" == "x" ]] && exit 0

for f in $bad_files ; do
    echo "Fixing TAB in $f"
    rm -rf foo
    expand $f > foo
    mv -f foo $f
done