Coworker: I'm confused about your script.
-
Coworker: I'm confused about your script.
Me: Yeah, I'll own that. The problem is I basically write bash scripts in cursive.
-
Scott Williams 🐧replied to Scott Williams 🐧 last edited by
I don't mean to write bash scripts in the most annoyingly possibly way to read. It just comes naturally to me. I mean, why not inject a subshell in the middle of regex parsing piped in xml from somewhere via xargs on one line? It's very efficient.
-
Scott Williams 🐧replied to Scott Williams 🐧 last edited by [email protected]
Oof. This isn't really even much of a hyperbole. It took me about 3 seconds to locate this gem of a line of code I wrote.
: ${version:=$(curl https://forgejo.org/releases/rss.xml 2>/dev/null | xpath -q -e '/rss/channel/item/title[not(contains(text(),"rc")) and not(contains(text(),"beta")) and not(contains(text(),"alpha"))]/text()' | sort -rV | head -1 | sed 's,v,,g')}
-
Jote 🏳️🌈 :verified_gay:replied to Scott Williams 🐧 last edited by
@vwbusguy Best font for coding is "Chiller" for things like that:
-
Scott Williams 🐧replied to Jote 🏳️🌈 :verified_gay: last edited by
@ailnoth That is both beautiful and absolutely terrifying.
-
@vwbusguy this makes sense to me
-
@alilly Me, too. This is natural for me, the way I'm wired. My coworkers, however, do not appreciate it.
-
Aaron Rainboltreplied to Scott Williams 🐧 last edited by
-
Scott Williams 🐧replied to Aaron Rainbolt last edited by
@arraybolt3 awk is always a crowd pleaser.
SERIAL=$(awk 'match($0, /[0-9]{10}/ ){ print substr($0, RSTART, RLENGTH) }' <(awk 'f{print;f=0} /\S+\s+SOA\s+\S+\s+\S+\s+\(/{f=1}' $ZONE_FILE));