#!/usr/bin/env perl # # unixifn - Unixify filenames # # $Id$ # the code could be cleaner, I'll admit use strict; use warnings; use Getopt::Std; my %opt; getopts( 'hnvudst:', \%opt ); if ( $opt{'h'} || !@ARGV ) { print STDERR < $g\n" if $opt{'v'}; if ( -e $g && !$opt{'f'} ) { warn "cannot rename: $g already exists\n"; } elsif ( !$opt{'n'} ) { rename( $f, $g ) or warn "failed to rename '$f' to '$g': $!\n"; } }