assume a textfile:
echo "import h from 'w.js?CACHEBUST';" > tmp/test.txt
this command:
sed -i 's/CACHEBUST/v=$(date +%s)/g' tmp/test.txt
results in my desired output:
import h from 'w.js?v=12345';
when trying to pipe that with find and xargs with:
find tmp -type f -print0 | xargs -0 sed -i 's/CACHEBUST/v=$(date +%s)/g'
I get undesired output:
import h from 'w.js?v=$(date +%s)';
My question: how do I force that expression to evaluate?
xargs / sed help?
@2ck ah, that's exactly it, thanks!
been a long time since I've banged my head against quotes :)