Re: Porting shell scripts from Tiny Tools

2023-11-22 Thread Nowarez Market
Also missing the target could be enough ironic: - about bloated html and js ask GitHub; - about the security of /tmp ask Theo. Anyway consider to download Tiny Tools from https://bsdload.com -- Nowarez Market Nov 22, 2023 12:08:36 Crystal Kolipe : > On Wed, Nov 22, 2023 at 11:44:12AM +0100, N

Re: Porting shell scripts from Tiny Tools

2023-11-22 Thread Crystal Kolipe
On Wed, Nov 22, 2023 at 11:44:12AM +0100, Nowarez Market wrote: > https://github.com/par7133/tiny-tools There is something ironic about having to download 204345 bytes of bloated html and javascript just to get the 170 bytes of source code for 'checkmd5'. But anyway, one improvement you could mak

Re: Porting shell scripts from Tiny Tools

2023-11-22 Thread Nowarez Market
Just made an addition to Tiny Tools for OpenBSD: checkmd5, an md5 checksum utility check256, a sha256 checksum utility You can find it here: https://github.com/par7133/tiny-tools == Nowarez Market

Re: Why is BRE still around? (Re: Porting shell scripts from Tiny Tools)

2023-11-19 Thread Marc Chantreux
hello, On Fri, Nov 17, 2023 at 07:22:57PM +0100, Christian Weisgerber wrote: > > I the same mood: I realized recently that no implementation of awk > > seems to implement quantifiers which is really desapointing. > Awk uses EREs, so if by quantifiers you mean {n,m}, then awk most > certainly suppo

Re: Why is BRE still around? (Re: Porting shell scripts from Tiny Tools)

2023-11-17 Thread Christian Weisgerber
Marc Chantreux: > I the same mood: I realized recently that no implementation of awk > seems to implement quantifiers which is really desapointing. Awk uses EREs, so if by quantifiers you mean {n,m}, then awk most certainly supports this. -- Christian "naddy" Weisgerber

Re: Porting shell scripts from Tiny Tools

2023-11-17 Thread Michael Dinon
On Tuesday, November 14, 2023, Daniele B. wrote: > Hello, > > I got inspired by the Tiny Tools article, by Gerald J. Holzmann, with some > useful shell tools code for coding on Unix-like systems. > > The article is severals years old (jan 2016) and code should be adapted to > OpebBSD. But I'm try

Re: Why is BRE still around? (Re: Porting shell scripts from Tiny Tools)

2023-11-17 Thread Marc Chantreux
hello, > but note that BREs are not a strict subset of EREs I have to admit that's the way I saw BRE so thanks a lot for noticing me. I the same mood: I realized recently that no implementation of awk seems to implement quantifiers which is really desapointing. I don't realize those things that

Re: Why is BRE still around? (Re: Porting shell scripts from Tiny Tools)

2023-11-17 Thread Christian Weisgerber
Marc Chantreux: > But is there another good reason for BRE to be still alive? > (perfomance, simplicity, or anything else). I think it is mostly for historical reasons, but note that BREs are not a strict subset of EREs: BREs allow back-references, EREs do not. The GNU project turned BREs and ER

Re: Porting shell scripts from Tiny Tools

2023-11-17 Thread Daniele B.
Just made an addition to Tiny Tools for OpenBSD, regextr - a reg expression facilitator for everyone. It is curious because anyone can customize it with its own abstract syntax. Furthermore it can be used yet to compose expressions like: wiz$ echo lol | pcregrep "`./regextr cap capname text /

Why is BRE still around? (Re: Porting shell scripts from Tiny Tools)

2023-11-17 Thread Marc Chantreux
hello, > these tools by default use basic regexps (BRE). Out of curiosity: To me, it's just a reason of retrocompat: no people dare breaking everything at some point. I really dislike the fact that it's confusing (for example: + must be protected but not *). But is there another good reason fo

Re: Porting shell scripts from Tiny Tools

2023-11-15 Thread Daniele B.
Ok received, thanks. Omar Polo wrote: > On 2023/11/15 16:13:04 +0100, "Daniele B." wrote: > > Testing regex for these "tiny tools" I noticed that both sed and > > grep have a limited support for regex syntax. In the case of grep I > > had to revert to pcregrep to get something better. > > t

Re: Porting shell scripts from Tiny Tools

2023-11-15 Thread Omar Polo
On 2023/11/15 16:13:04 +0100, "Daniele B." wrote: > Testing regex for these "tiny tools" I noticed that both sed and grep have a > limited > support for regex syntax. In the case of grep I had to revert to pcregrep to > get something > better. these tools by default use basic regexps (BRE). Yo

Re: Porting shell scripts from Tiny Tools

2023-11-15 Thread Daniele B.
Testing regex for these "tiny tools" I noticed that both sed and grep have a limited support for regex syntax. In the case of grep I had to revert to pcregrep to get something better. -- Daniele Bonini Nov 14, 2023 23:52:01 Daniele B. : > Daniele B. : > >> You can find the first of these shel

Porting shell scripts from Tiny Tools

2023-11-14 Thread Daniele B.
Daniele B. : > You can find the first of these shell tools, "nana" (my daughter chinese name > that in italian means 'short female') resembling and > enanching the original tool "num". It is here on https://bsdload.com I just finish to convert the most of them adding the following tools: - fun (

Re: Porting shell scripts from Tiny Tools

2023-11-14 Thread Crystal Kolipe
On Tue, Nov 14, 2023 at 02:34:27PM +0100, Omar Polo wrote: > On 2023/11/14 08:19:11 -0300, Crystal Kolipe > wrote: > > On Tue, Nov 14, 2023 at 11:43:14AM +0100, Daniele B. wrote: > > > enanching the original tool "num". > > I haven't read the previous linked stuff but > > > /bin/cat already has

Re: Porting shell scripts from Tiny Tools

2023-11-14 Thread Daniele B.
I'm not sure your call is directed to me. But I take it like a compliment if this stuff is inspirational for you too. Indeed, cat miss an -o for line offset. Putting my hands on OpenBSD development will require a lot of time and effort, upgrade of my stick to current and dev tools, C refresh with

Re: Porting shell scripts from Tiny Tools

2023-11-14 Thread Omar Polo
On 2023/11/14 08:19:11 -0300, Crystal Kolipe wrote: > On Tue, Nov 14, 2023 at 11:43:14AM +0100, Daniele B. wrote: > > enanching the original tool "num". I haven't read the previous linked stuff but > /bin/cat already has the -c option to number lines, although it always starts > numbering at 1.

Re: Porting shell scripts from Tiny Tools

2023-11-14 Thread Crystal Kolipe
On Tue, Nov 14, 2023 at 11:43:14AM +0100, Daniele B. wrote: > enanching the original tool "num". /bin/cat already has the -c option to number lines, although it always starts numbering at 1. Wouldn't it be more useful to add the functionality to start numbering at a certain offset to /bin/cat by

Porting shell scripts from Tiny Tools

2023-11-14 Thread Daniele B.
Hello, I got inspired by the Tiny Tools article, by Gerald J. Holzmann, with some useful shell tools code for coding on Unix-like systems. The article is severals years old (jan 2016) and code should be adapted to OpebBSD. But I'm trying to convert them anyway. You can find the first of these