3 ms·
Give it a go! For a fun starter example, I recently wrote an awk program to add-or-replace a key pair in a .env file. Easy enough to do with a one liner, but wa
by corytheboyd 3y ago
Give it a go! For a fun starter example, I recently wrote an awk program to add-or-replace a key pair in a .env file. Easy enough to do with a one liner, but was a fun little mid-day code challenge! The tricky part is the “add if not present”, the END part of an awk program comes in handy here :)
IRL I ended up moving it all into a go cli since there were other complicated moving parts, but just that bit was completely doable with pure (and clear) awk!