deimos on Nostr: I think I would do something like this: for file in *.mdbuild; do newname=$(echo ...
I think I would do something like this:
for file in *.mdbuild; do
newname=$(echo "$file" | sed 's/\.mdbuild$/.html/')
mv "$file" "$newname"
done
Edit as needed for dir paths, etc.
Published at
2024-11-06 23:39:57Event JSON
{
"id": "64ea049c52214e7abd50ec862ad2250036bb3dbbce7a5e285e14987209af82a4",
"pubkey": "3d488fce43b43a6c3cb62d57d95d99e8a3710aeb01859262b8b0edbda2ab5ac5",
"created_at": 1730936397,
"kind": 1,
"tags": [
[
"e",
"9a3bcf52107649587534d8f6f9003b046da071232a6e43f12ba3eda528d57669",
"",
"root"
],
[
"p",
"76a830addb47903a3c8093772cd4b03d936ae4b4bb80810d42005249c84b517e"
]
],
"content": "I think I would do something like this:\n\nfor file in *.mdbuild; do\n newname=$(echo \"$file\" | sed 's/\\.mdbuild$/.html/')\n mv \"$file\" \"$newname\"\ndone\n\n\nEdit as needed for dir paths, etc. \n",
"sig": "da513cf5b0425dec5318f371b3260060b9904aa044acd39fcd12817b52a0616204f9a70f56c645411b0b9b85d4293685ec4b6a67b6c3ab7389bd9111842e23f5"
}