From: Akim Demaille <[EMAIL PROTECTED]>
Date: 25 Oct 2000 12:14:12 +0200
/tmp % echo "Xfoo" | nostromo 12:08
pipe> sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/p; q; }
pipe quote> /^X\(\/\/\)[^/].*/{ s//\1/p; q; }
pipe quote> /^X\(\/\/\)$/{ s//\1/p; q; }
pipe quote> /^X\(\/\).*/{ s//\1/p; q; }
pipe quote> s/.*/./p; q'
.
.
Arg! -n is missing, so since there is a `p', it's printed twice.
Sorry about that. I never had a broken machine to test the sed
replacement on. :-)
Paul, what do you prefer? I chose not to add `-n' but to remove the
`p', if you think there is a difference and you prefer the other
solution, I'll adjust the code.
I assume you removed all the "p"s, and not just the last one. If so,
I think your change is OK. The only difference in behavior is if
"foo" contains a newline, and the sed replacement mishandles newlines
anyway, so that's not a real problem.
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite Pavel Roskin
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite David Morgan
- Re: Success (mostly) with the testsuite Paul Eggert
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite Alexandre Oliva
- Re: Success (mostly) with the testsuite Akim Demaille
- Various systems (was: Success (mostly) with t... Akim Demaille
- Re: Various systems (was: Success (mostly) wi... David Morgan
- Re: Various systems (was: Success (mostly) wi... Akim Demaille
- Re: Various systems (was: Success (mostly) wi... David Morgan
- Re: Various systems (was: Success (mostly) wi... Akim Demaille
- Re: Success (mostly) with the testsuite Akim Demaille
- Re: Success (mostly) with the testsuite Akim Demaille
