But as a Linux CLI lang, or for simple one-off scripts... Python is better. Scripts (and also competitive programming) favour languages capable of compact solutions and universal stdlib. Lua, because is has no stdlib to speak of and a limited amount of syntax sugar. It is just so much less useful for these purposes.
As for competitive flavours of programming... I recently gave it a go for Advent of Code 2024.
My impressions: https://www.reddit.com/r/adventofcode/comments/1hvnou1/2024_...
My repo: https://github.com/vkazanov/advent-of-code-2024?tab=readme-o...
TL;DR Python is better here.