File: fix_tab

package info (click to toggle)
maxima-sage 5.45.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 113,788 kB
  • sloc: lisp: 440,833; fortran: 14,665; perl: 14,369; tcl: 10,997; sh: 4,475; makefile: 2,520; ansic: 447; python: 262; xml: 59; awk: 37; sed: 17
file content (14 lines) | stat: -rwxr-xr-x 258 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

pattern=`printf "\t"`
bad_files=`find . -name '*.texi' -print0 | xargs -0 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