Which is quicker?
Going to a Finder window with 700-odd images, and dragging them in to chapters by folder?
Or going in to the command line and using a line like this:
$ mv AnPhys-Fig-18-* /Documents/Hill/Hill\ IRCD\ Revision\ 2/Unlabeled\ JPG/ch18/high-res/
…but with each up-arrow having to tick back through the path to update the chapter numbers?
I wish I could pattern-match on the command line. Can I do that? Something like this:
$ mv AnPhys-Fig-(\d\d)-* /Documents/Hill/Hill\ IRCD\ Revision\ 2/Unlabeled\ JPG/ch$1/high-res/
Of course, $1 is a shell-scripting convention for the first argument after the command, so I doubt I could use it in the command itself.
I know I could do this with Perl, but the scripts I’ve done have been too hard-wired to be useful from the command line. The patterns are too involved.
Now Playing: Lullaby from Sometime Anywhere by The Church
Comments
for ((num=1; num <= 20; ++num)); do for file in
ls AnPhys-Fig-$num; do mv $file /path/ch${num}/more_path; done; donePosted by: Brent | January 20, 2005 11:09 PM