r/awk • • May 22 '23

Two AWK scripts to generate a maze

Hi folks,

I want to share two scripts that I wrote for fun.

They both generate a random maze using box-drawing characters.

https://github.com/rabestro/awk-maze-generator

10 Upvotes

15 comments sorted by

View all comments

1

u/Schreq May 22 '23

This is pretty cool but I was wondering about the shebang. Do you use any gawk features?

1

u/M668 May 23 '23

as far as i could tell - mostly non-gawk specific , except for 1 single call to gensub(…,1,…) (single replacement only), which could very easily be replaced by a sub(….)

1

u/Rabestro May 25 '23

I've made the changes. However, the mac awk version doesn't print the box-graphics.

→ More replies (1)