This is a discussion on Re: pfile start script within the IPFilter forums, part of the System Security and Security Related category; In some email I received from Hans Werner Strube, sie wrote: > Carson Gaspar wrote: > > --On Saturday, July ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
In some email I received from Hans Werner Strube, sie wrote:
> Carson Gaspar wrote: > > --On Saturday, July 03, 2004 7:13 PM +1000 Darren Reed > > <darrenr@reed.wattle.id.au> wrote: > > > > > I think using the pattern 'hostname.*[!:][0-9]' is better to only > > > match real interface names. > > > .... > > You can't do what you want using only normal globs. You can do it with > > extglobs (shopt -s extglob in bash): > > > > carson:gandalf 0 $ ls hostname.+([!:]) > > hostname.foo0 > > > > Or you can do it in (POSIX) shell: > > > > carson:gandalf 0 $ OIFS="${IFS}" IFS="${IFS}:"; ls hostname.* | while read > > intf alias; do if [ -z "${alias}" ]; then echo $intf; fi; done; > > IFS="${OIFS}" > > hostname.foo0 > > Wouldn't the following simplification of S10pfil be sufficient? No. sed is in /usr/bin and /usr may not be mounted when S10pfil runs. Darren |