#!/bin/bash for f in $@ do cp $f $f.bak emacs -batch -l $HOME/.emacs $f --eval '(progn (indent-region (point-min) (point-max) nil ) (save-buffer) ) ' done