Looking for Primos "name generation" code

Posted by Greg E on Super User See other posts from Super User or by Greg E
Published on 2012-06-02T07:19:06Z Indexed on 2012/06/02 10:44 UTC
Read the original article Hit count: 243

Filed under:

Anyone remember Primos ? It had a shell-level thing called "name generation" which was very useful. Eg. to rename a bunch of files from part1.suffix to part1.new.suffix2 you could say

rename *.suffix =.+new.suffix2

That's a very simple example, it was quite powerful. The control characters were:

=,==,^=,^==,+

Which meant approximately: match 1 filename component, match all remaining components, delete one component, delete all remaining, add a component.

In conjunction with Primos wildcards you could do pretty much any useful file renaming/copying operation very conveniently.

It was much better than Unix wildcards and name generation/iteration and I'd like to find it again and use it. Anyone seen it around ?

Not much reference on the interweb: search "Primos name generation" and you get a few fragmentary hits.

Thanks !

© Super User or respective owner

Related posts about shell