tinyapps.org / blog

HTML Tidy: Batch processing files #

HTML Tidy does not natively support wildcards in filenames (e.g., *.html), but batch processing in bash is possible with a simple for loop:
  for f in *.html;do tidy -m -i $f;done
-m = modify original input files
-i = indent element content

(For a complete list of arguments, see the man page.)

/nix | Jan 24, 2010

Subscribe or visit the archives