-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At some point hitherto, Ken Ambrose hath spake thusly:
> Hello, all. As previously noted, I just got hitched. I've also got a
> bunch of pictures, now (good ones, too!)
You should post a link to them when you're done!
>, and I'd like to munge 'em down small with "convert" or "mogrify" or
>somesuch. However, I've got spaces in the filenames. While it would
>be moderately trivial to s/ /_/g; I would prefer to do it the "right"
>way
Some (like me) would argue that the right way *is* to remove the
spaces from your filenames. Here's a quote (approximately -- I don't
have my copy handy to refer to) from the Linux Administrator's
Handbook, by Nemeth, et. al.:
"Using spaces in filenames is DUMB... even Microsoft's command-line
interface uses space as an argument delimeter."
Here's a Q&D perl script to do this for you (it also converts to lower
case):
#!/usr/bin/perl
my $filename;
while ( $ARGV[0] ){
$filename = "\L$ARGV[0]\E";
$filename =~ s/ /_/g;
rename( $ARGV[0], $filename );
print "$filename\n";
shift( @ARGV );
}
Now, I'm prejudiced... It's a little known fact that the author of
the above quote is me. :) The authors just happened to agree with my
review comments.
- --
Derek Martin [EMAIL PROTECTED]
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE85WM+djdlQoHP510RAtM9AJ4sKaN3LT+UNAx4a6ZmPvFLgoMGBQCfZkTP
I7wFIsNzbKYjEZUbAVtTrJ0=
=BIJq
-----END PGP SIGNATURE-----
*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************