Re: tr portability

2022-08-25 Thread Simon Josefsson via Gnulib discussion list
tor 2022-08-25 klockan 19:21 +0200 skrev Bruno Haible: > Simon Josefsson wrote: > > > In GNU gettext, many tests use "tr -d '\r'" since 2007 already, > > > and no one > > > ever has reported a problem with it. > > > > But does it fail fatally when it doesn't work?  tests/parser.sh in > > libtasn1

Re: tr portability

2022-08-25 Thread Bruno Haible
Simon Josefsson wrote: > > In GNU gettext, many tests use "tr -d '\r'" since 2007 already, and no one > > ever has reported a problem with it. > > But does it fail fatally when it doesn't work? tests/parser.sh in > libtasn1 did It leads to a test failure, yes, because it removed all 'r's from

Re: tr portability

2022-08-25 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > Since we are already stating in the generic INSTALL file, since 2008: > > On Solaris, don't put '/usr/ucb' early in your 'PATH'. This > directory contains several dysfunctional programs; working variants of > these programs are available in '/usr/bin'. So, if

Re: tr portability

2022-08-25 Thread Bruno Haible
Simon Josefsson wrote: > This is unrelated, but alas I've not found a more portable way to trim > CR than this since some tr do not support \r: > > if echo solaris | tr -d '\r' | grep solais > /dev/null; then > cr='\015' > else > cr='\r' > fi > # normalize output > LC_ALL=C tr -d "$cr" <

Re: tr portability

2008-04-26 Thread Bruno Haible
Ralf Wildenhues wrote: I hear that there really do exist systems in actual use on which tr still does not honor backslash-escapes like \r and \n. Which platforms, please? Solaris 10 /usr/ucb/tr. Not likely to be early in PATH, but hey, people do all kinds of weird things to their

Re: tr portability

2008-04-26 Thread Ralf Wildenhues
* Bruno Haible wrote on Sat, Apr 26, 2008 at 02:06:17PM CEST: Ralf Wildenhues wrote: I hear that there really do exist systems in actual use on which tr still does not honor backslash-escapes like \r and \n. Which platforms, please? Solaris 10 /usr/ucb/tr. Not likely to be

Re: tr portability

2008-04-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 4/26/2008 6:16 AM: | | Maybe the Autoconf manual should contain: please don't put /usr/ucb | nor '.' in $PATH, and if you must, put it as late as possible. | Dunno, I don't have a strong opinion on all of this. Yes,

Re: tr portability

2008-04-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 4/26/2008 6:06 AM: | Ralf Wildenhues wrote: | I hear that there really do exist systems in actual use | on which tr still does not honor backslash-escapes like \r and \n. | Which platforms, please? | Solaris 10

Re: tr portability

2008-04-26 Thread Bruno Haible
Eric Blake wrote: | Maybe the Autoconf manual should contain: please don't put /usr/ucb | nor '.' in $PATH, and if you must, put it as late as possible. | Dunno, I don't have a strong opinion on all of this. Yes, we could add that, but it won't help the fact that configure is run by people