On Thu, 20 Jan 2011, Christian Brabandt wrote:
On Thu, January 20, 2011 8:08 am, Ben Schmidt wrote:
Yeah, it does. Every command does its argument separation itself,
too. The Windows APIs only supply the commandline as a string
(though the C library of whatever compiler you're using will have
some standard way of doing this--mind you, it isn't consistent
between libraries, and therefore not consistent between apps, which
is a pain). Unless something changed in the last few years, which I
don't think it has.
I just never knew the rename command would actually work like that.
Fascinating.
That was actually one of the few things that really annoyed me, when
switching to Linux.
"Why do I need to script something using a loop, if Windows can do it
much more easily"?
There's usually a 'rename' command on Linux machines I use. It's in
util-linux on OpenSUSE, sys-apps/util-linux on Gentoo. It's a pretty
commonly-installed package since it also contains `which`, `whereis`,
`col`, `flock`, `swapon`, and more.
It doesn't work quite the same, though:
Windowsy: rename *.a *.b
Linuxy: rename .a .b *.a
It's: rename [from] [to] [list-of-files]
If [from] is the empty string, it'll prepend [to]. So, to prepend 'old_' to
a bunch of files:
rename '' old_ *.a
--
Best,
Ben
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php