Justine Smithies on Nostr: I'm needing some #FreeBSD 14.1 sed assistance as my blarg blog script is now failing ...
I'm needing some #FreeBSD 14.1 sed assistance as my blarg blog script is now failing under FreeBSD.
When this line runs:
echo "$filename" | sed -r 's|\w+/(.*).md|build/\1.html|'
I get this error:
sed: 1: "s|\w+(.*).md|build/\1.h ...": RE error: trailing backslash (\)
I tried removing the \ before the w and the error goes away but the sed line doesn't do anything then ?
It is supposed to change any .md file paths into build/*.html
For example if it gets posts/my-first-freebsd-server.md it should output build/my-first-freebsd-server.html
This worked on #ChimeraLinux and #VoidLinux
I have noticed this but not sure if it's relevant ????
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893#c11Any ideas please and thank you ? ❤️
Published at
2024-11-06 17:59:15Event JSON
{
"id": "9a3bcf52107649587534d8f6f9003b046da071232a6e43f12ba3eda528d57669",
"pubkey": "76a830addb47903a3c8093772cd4b03d936ae4b4bb80810d42005249c84b517e",
"created_at": 1730915955,
"kind": 1,
"tags": [
[
"t",
"freebsd"
],
[
"t",
"chimeralinux"
],
[
"t",
"voidlinux"
],
[
"proxy",
"https://snac.smithies.me.uk/justine/p/1730915955.850136",
"activitypub"
]
],
"content": "I'm needing some #FreeBSD 14.1 sed assistance as my blarg blog script is now failing under FreeBSD.\nWhen this line runs:\n\necho \"$filename\" | sed -r 's|\\w+/(.*).md|build/\\1.html|'\n\nI get this error:\n\nsed: 1: \"s|\\w+(.*).md|build/\\1.h ...\": RE error: trailing backslash (\\)\n\nI tried removing the \\ before the w and the error goes away but the sed line doesn't do anything then ?\nIt is supposed to change any .md file paths into build/*.html\nFor example if it gets posts/my-first-freebsd-server.md it should output build/my-first-freebsd-server.html\nThis worked on #ChimeraLinux and #VoidLinux\n\nI have noticed this but not sure if it's relevant ????\nhttps://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893#c11\n\nAny ideas please and thank you ? ❤️\n",
"sig": "ae076f925334b6923f6fbecf2e7e7eb2ac0967317518ddb9bfafdb2a031d8dd61149e6cb672a79aaa063b4d28134741393a76051ce22a40ba0a83cd30c014262"
}