Tootfinder

Opt-in global Mastodon full text search. Join the index!

@theodric@social.linux.pizza
2026-03-26 06:14:50

In the grand European tradition of asking the same question over and over until the correct answer is provided, Chat Control is back for another vote! fightchatcontrol.eu/?foo=bar

@mxp@mastodon.acm.org
2026-03-17 20:55:09

I’ve been using idioms like
find . -name \*.foo | while read f; do mv $f ${f%%.foo}.bar; done
for decades. Now I’m preparing an exercise where students are to rename all files that do not end in .txt; so something like this should do the trick:
find . -not -name \*.txt | while read f; do mv $f ${f%%.*}.txt; done
Except... ${f%%.*} is empty! ${f%.*} works, but why!?
Finding the obvious took me an hour… And why do I only stumble upon such things when preparing exe…

‪@mxp@mastodon.acm.org‬
2026-03-17 20:55:09

I’ve been using idioms like
find . -name \*.foo | while read f; do mv $f ${f%%.foo}.bar; done
for decades. Now I’m preparing an exercise where students are to rename all files that do not end in .txt; so something like this should do the trick:
find . -not -name \*.txt | while read f; do mv $f ${f%%.*}.txt; done
Except... ${f%%.*} is empty! ${f%.*} works, but why!?
Finding the obvious took me an hour… And why do I only stumble upon such things when preparing exe…

@mxp@mastodon.acm.org‬
2026-03-17 20:55:09

I’ve been using idioms like
find . -name \*.foo | while read f; do mv $f ${f%%.foo}.bar; done
for decades. Now I’m preparing an exercise where students are to rename all files that do not end in .txt; so something like this should do the trick:
find . -not -name \*.txt | while read f; do mv $f ${f%%.*}.txt; done
Except... ${f%%.*} is empty! ${f%.*} works, but why!?
Finding the obvious took me an hour… And why do I only stumble upon such things when preparing exe…

@shanmukhateja@social.linux.pizza
2026-03-07 18:16:56

Not proud or satisfied about this bug fix as I had to use ChatGPT in the end.
github.com/shanmukhateja/gitra
The fix was computing `objFullPath` over each iteration and then use it when computing absolute path for a tree node.