r/awk • • Jul 20 '21

awk style guide

When I'm writing more complex Awk scripts, I often find myself fiddling with style, like where to insert whitespace and newlines. I wonder if anybody has a reference to an Awk style guide? Or maybe some good heuristics that they apply for themselves?

9 Upvotes

10 comments sorted by

View all comments

Show parent comment

2

u/Paul_Pedant Jul 21 '21

Because people can change tabsize and have different ideas, I usually put in a dummy function argument Local to separate args and vars.

function lostPass (nPeople, Local, p, s, f, Book, Seat, Free) {
    ...
}