I think that's because it's a trivial "Shell Programming 101"
homework assignment, and we have a general policy against doing
people's schoolwork for them ...
Here are two clues for you: "for DIR in gpiochip*"; and then
"LABEL=$(cat $DIR/label)". I'm quite certain that if you put
aside your demonstrably strong desire to flame, you can solve
that little problem.
Or perhaps the issue here is just bikeshedding. Regardless,
the signal-to-noise ratio is way too low..
--