[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Renaming file using wildcard
From: |
Tod Oace |
Subject: |
Re: Renaming file using wildcard |
Date: |
Mon, 6 Oct 2003 10:54:36 -0700 |
I know that there will only be one file that matches the wildcard but
I have no way of precomputing the date stamp. Is there any way I can
do something like: (below obviously doesn't work)
copy:
/etc/snmp/conf/_snmpdx.rsrc.JASS.* dest=/etc/snmp/conf/snmpdx.rsrc
How about:
shellcommands:
"mv /etc/snmp/conf_snmpdx.rsrc.JASS.*
/etc/snmp/conf/snmpdx.rsrc"
Seems like it'd work, and it wouldn't leave the old copy.
It'd be nice though, I think, to be able to translate file names so
/usr/sbin/sendmail,${os} and /usr/sbin/makemap,${os} could be installed
in one copy instead of two. I could've done "copy: /usr/sbin/${os}
dest=/usr/sbin include=sendmail include=makemap server=...". I'm
copying out of a checkout of CVS repository by the way.
When I was first deciding how to deal with installs of binaries I was
hoping to find a way to rename files on the fly. I got excited when I
looked at filters until I realized it was just effectively find(1).
It's a very cool feature, but it doesn't modify file names like I
thought it was going to...just the set of files that are going to be
worked with.
I know it's a big change, but if filter: had some kind of
"strip=re-suffix" feature, and things using the filter knew how to use
the old and new versions of the file, that would be very handy wouldn't
it? Or maybe all I really want is for copy: to have some kind of
"strip=re-suffix" feature. Or maybe "copy: /usr/sbin/${os}/" isn't a
bad idea. How are other people doing it?
--
Tod Oace, Intel Corporation <tod@intel.com>