3 #=======================================================================
5 # File ID: 368543a6-5d3a-11df-91ac-90e6ba3022ac
7 # Change spaces in file names to '_' and convert ASCII apostrophes to
10 # Author: Øyvind A. Holm <sunny@sunbase.org>
11 # License: GNU General Public License version 2 or later.
12 #=======================================================================
14 progname
=fix_filenames
26 " -n "$progname" -- "$@
")"
27 test "$?" = "0" ||
exit 1
35 -h|
--help) opt_help
=1; shift ;;
36 -q|
--quiet) opt_quiet
=$
(($opt_quiet + 1)); shift ;;
37 -v|
--verbose) opt_verbose
=$
(($opt_verbose + 1)); shift ;;
38 --version) echo $progname $VERSION; exit 0 ;;
40 *) echo $progname: Internal error
>&2; exit 1 ;;
43 opt_verbose
=$
(($opt_verbose - $opt_quiet))
45 if test "$opt_help" = "1"; then
46 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
49 Change spaces in file names to '_' and convert ASCII apostrophes to
52 Usage: $progname [options]
59 Be more quiet. Can be repeated to increase silence.
61 Increase level of verbosity. Can be repeated.
63 Print version information.
69 prename
-v 's/ /_/g' "$@"
70 prename
-v "s/'/’/g" "$@"