[Pm-utils] POSIXification of pm-utils

Victor Lowther victor.lowther at gmail.com
Sun Jan 13 09:13:32 PST 2008


On Jan 13, 2008 10:53 AM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> On Jan 13, 2008 12:58 AM, Till Maas <opensource at till.name> wrote:
> > The only other solution I know would be something like
> > for file in $(ls $syshooks/*[!~] $phooks/*[!~])
> > do
> >  echo ${f##*/}
> > done | sort -n | uniq
>
> I'm not sure if I'm following the whole discussion, but why not just
> do a file test like you did in the other part?
>
> local bases=$(for f in $syshooks/*[!~] $phooks/*[!~]; do
>                              [ -f "$f" ] || continue; echo ${f##*/}; done |
>                              sort -n | uniq)

This is what the current code does (almost).
http://hg.fnordovax.org/pm-utils/annotate/73184527be5d/pm/functions


> --
> Dan

-- 
Victor Lowther
Ubuntu Certified Professional


More information about the Pm-utils mailing list