On Tue, Oct 12, 2010 at 11:07:48PM -0500, Dustin J. Mitchell wrote: > On Tue, Oct 12, 2010 at 10:53 PM, Jon LaBadie <[email protected]> wrote: > > The manpage Amanda(8) where "Host and Disk Expression" > > are documented indicates some wildcarding is allowed. > > Thus, for a host where I wanted all DLEs excpet one > > that began with the letter "A" I tried: > > > > ?? ?? ?? ??amdump <config> host '[!A]*' > > > > This was a no-starter, giving an argument of: > > > > ?? ??Argument [!A]* cannot be both a host and a disk > > > > What have I overlooked in the docs? > > The problem is that "[!A]*" matches both a host and a disk. This > [host [disk .. ] .. ] syntax is ambiguous. You could have either > meant > "all disks not beginning with A on host HOST" > or > "all DLEs on host HOST and all hosts not beginning with A" >
Yeah, after I pasted that message in and sent off the message the interpretation came to me. > IMHO, an ambiguous syntax like this is stupid, because it may work > fine until one day you change the set of available items. For > example, if you had no hosts beginning with A, then the expression > would work. But as soon as you added such a host, the syntax would > stop working. > > That said, it's the syntax we've got, and backward compatibility is job #1. I wonder if a syntax extension that would be backward compatible is possible. Blue-skying here, maybe a single argument with a separator between host and disk. Something like 'host|disk' or 'host/disk'. Of course the separator needs to be a character which will not appear in the hostname or diskname. Arpanet and IETF specify that hostnames on the internet should be restricted to letters, digits, and hyphen (no hyphen at start or end). Though valid in unix and linux, would anyone be foolish enough to include a '|' as part of a file system or directory name? Any merit (or problems) to the idea? Or maybe the need does not occur often enough to matter. Jon -- Jon H. LaBadie [email protected] JG Computing 12027 Creekbend Drive (703) 787-0884 Reston, VA 20194 (703) 787-0922 (fax)
