# perl oneliner perl -e '-f && ($a = $_) =~ s/(?:\.html){2,}$/.html/ && -e $new ? warn $_ : rename $_, $new for @ARGV' *.html