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! https://fightchatcontrol.eu/?foo=bar
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! https://fightchatcontrol.eu/?foo=bar
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…
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…
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…
Not proud or satisfied about this bug fix as I had to use ChatGPT in the end.
https://github.com/shanmukhateja/gitraven/pull/1
The fix was computing `objFullPath` over each iteration and then use it when computing absolute path for a tree node.