bug in commit 20f6b54385d2462d858419f7c67509cb3d22d155

Dmitry V. Levin ldv at altlinux.org
Mon Mar 26 12:26:55 UTC 2012


On Mon, Mar 26, 2012 at 01:56:22PM +0200, Andreas Schwab wrote:
> Denys Vlasenko <vda.linux-gM/Ye1E23mwN+BqQ9rBEUg at public.gmane.org> writes:
> 
> > Hi Dmitry,
> >
> >  for file in "$logfile".*; do
> >         [ -f "$file" ] || continue
> > -       suffix=${file:1+$pfxlen}
> > -       [ "$suffix" -gt 0 ] 2> /dev/null || {
> > -               echo "Skipped file '$file' (bad suffix)" >&2
> > +       suffix=${file#$logfile.}
> >
> > suffix=${file#$logfile.} is not a good way to strip $logfile prefix:
> > ${var#pattern} operation interprets <pattern>, indeed, as glob pattern.
> 
> Unless quoted.
> 
> > Try this:
> >
> > logfile="????"
> > file=FILE.123
> > suffix=${file#$logfile.}
>   suffix=${file#"$logfile".}

Thanks, I've pushed this fix.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120326/aa292639/attachment.bin>


More information about the Strace-devel mailing list