Re: replacement for 'join'?

2021-05-14 Thread Bernhard Voelker
On 5/14/21 7:42 PM, Simon Josefsson via Gnulib discussion list wrote: > Certainly! Was anyone working on setting up CI/CD for gnulib on GitLab? > I recall there was a private project for it, but I don't have access. > Any reason for this? I have become rather aquinted with GitLab CI/CD > lately s

Re: replacement for 'join'?

2021-05-14 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: >> However I think these lists often become outdated. In my view, to claim >> that a platform is supported by a software project, you should have >> continous building for the platform. Otherwise support is reactive and >> tends to be spurious. > > Gnulib is a hobbyist, vol

Re: replacement for 'join'?

2021-05-14 Thread Bernhard Voelker
On 5/14/21 6:19 PM, Bruno Haible wrote: > Gnulib is a hobbyist, volunteer project. We can not provide the same > level of support as, for example, you do with your company. Therefore — > unless someone comes up and invests the necessary time and money for the > multi-platform continuous integration

Re: replacement for 'join'?

2021-05-14 Thread Bruno Haible
Simon Josefsson wrote: > https://git.savannah.gnu.org/cgit/gnulib.git/tree/DEPENDENCIES > > Ironically, it does not mention 'join' but mention a lot of other tools. Good point. Fixed through the patch below. > However I think these lists often become outdated. In my view, to claim > that a plat

Re: replacement for 'join'?

2021-05-14 Thread Simon Josefsson via Gnulib discussion list
Bernhard Voelker writes: > On 5/12/21 7:58 PM, Simon Josefsson via Gnulib discussion list wrote: >> It would be nice to write a 'join' replacement for gnulib-tool, as that >> is the only thing that needs coreutils for bootstrapping libidn2 on >> alpine. But it is not important, and with your pat

Re: replacement for 'join'?

2021-05-14 Thread Bruno Haible
Bernhard Voelker wrote: > I'm wondering if we have a list of supported platforms for maintainers Not officially. We just assume that no one will be silly enough to use e.g. Solaris 10 — without added GNU tools — as their development platform. Every platform, even Solaris 10 and embedded platforms

Re: replacement for 'join'?

2021-05-14 Thread Bernhard Voelker
On 5/12/21 7:58 PM, Simon Josefsson via Gnulib discussion list wrote: > It would be nice to write a 'join' replacement for gnulib-tool, as that > is the only thing that needs coreutils for bootstrapping libidn2 on > alpine. But it is not important, and with your patch things work as > good as they

Re: replacement for 'join'?

2021-05-12 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > That is not proper behaviour. Fixing it through the patch below. Thank you! It would be nice to write a 'join' replacement for gnulib-tool, as that is the only thing that needs coreutils for bootstrapping libidn2 on alpine. But it is not important, and with your patch th

Re: replacement for 'join'?

2021-05-12 Thread Bruno Haible
Hi Simon, > > Alpine Linux does not have the 'join' program. > > The GCS [1] don't list it among the essential utilities. > > I ran into that problem during ./bootstrap -- it seems gnulib-tool > relies on the 'join' tool as well: > > ./bootstrap: gnulib/gnulib-tool--no-changelog --aux-dir=

Re: replacement for 'join'?

2021-05-12 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > Alpine Linux does not have the 'join' program. > The GCS [1] don't list it among the essential utilities. I ran into that problem during ./bootstrap -- it seems gnulib-tool relies on the 'join' tool as well: ./bootstrap: gnulib/gnulib-tool--no-changelog --aux-dir=bu

Re: replacement for 'join'?

2021-04-07 Thread Bruno Haible
Bernhard Voelker wrote: > but doesn't HP-UX' sed support the POSIX -f option there? Probably it does. But then the replacement script would have to create a temporary file. Which is about 30 lines of shell code. Bruno

Re: replacement for 'join'?

2021-04-07 Thread Bernhard Voelker
On 4/6/21 10:45 PM, Bruno Haible wrote: > For small data, I would have transformed the first file to a 'sed' > script, that I would then apply to the second file. But HP-UX 'sed' > has a limit of 100 -e expressions per invocation. I don't have access to HP-UX (and there's none in the GCC compile f

Re: replacement for 'join'?

2021-04-06 Thread Bruno Haible
Paul Eggert wrote: > Yes, 'awk' is the way to go if you want more 'join' capability (not just > treating the entire line as the key). But if the data are not large and > each key takes up the whole line, 'grep' should work fine. The data is large, unfortunately. The two input files contain lists

Re: replacement for 'join'?

2021-04-06 Thread Paul Eggert
On 4/6/21 2:40 AM, Bernhard Voelker wrote: grep -Fvf file2 file1 I started with that, too, but it is problematic because: a) it doesn't do a whole-word search ... and 'grep -w' seems not to be portable, b) it doesn't limit the matching on the key field. And messing with regular expressions seems

Re: replacement for 'join'?

2021-04-06 Thread Bernhard Voelker
On 4/6/21 4:24 AM, Paul Eggert wrote: > grep -Fvf file2 file1 I started with that, too, but it is problematic because: a) it doesn't do a whole-word search ... and 'grep -w' seems not to be portable, b) it doesn't limit the matching on the key field. And messing with regular expressions seems to b

Re: replacement for 'join'?

2021-04-05 Thread Paul Eggert
On 4/5/21 6:01 PM, Bruno Haible wrote: Wonderful! Thank you. Both solutions work fine with the 'awk' on Alpine Linux (BusyBox v1.32.1). It looks like you're talking about a simple one-field-per-line join. If so, the following should also work and is simpler: grep -Fvf file2 file1 though it

Re: replacement for 'join'?

2021-04-05 Thread Bruno Haible
Hi Berny, > > join -v 1 FILE1 FILE2 > > Maybe awk? > > $ awk -v keyfile=file2 ' > BEGIN { while ((getline < keyfile) > 0) k[$1]=1 } > !k[$1] > ' file1 > or > > $ awk ' > keys { k[$1]=1; next } > !k[$1] > ' keys=1 file2 keys=0 file1 Wonderful! Thank you

Re: replacement for 'join'?

2021-04-05 Thread Bernhard Voelker
On 4/5/21 1:06 AM, Bruno Haible wrote: > Alpine Linux does not have the 'join' program. > The GCS [1] don't list it among the essential utilities. FWIW: join(1) is required by POSIX [1]: [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/join.html > So, what kind of replacement for i

replacement for 'join'?

2021-04-04 Thread Bruno Haible
Alpine Linux does not have the 'join' program. The GCS [1] don't list it among the essential utilities. So, what kind of replacement for it would you recommend? My use-case is join -v 1 FILE1 FILE2 Bruno [1] https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html