FreeBSD Fortune on Nostr: Want to use sed(1) to edit a file in place? Well, to replace every 'e' with an 'o', ...
Want to use sed(1) to edit a file in place? Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
sed -i.bak s/e/o/g foo
And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:
sed -i '' s/e/o/g foo
Published at
2024-10-03 17:00:42Event JSON
{
"id": "b025e275a506c9ca4d0376c6daa05145b6bf124165add57562e9838853bdfdee",
"pubkey": "49792b0c3e803bb97f4005f83a8d6c09a58c6ea7f04e1ab19d149f9fabbbcee3",
"created_at": 1727974842,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.bsd.cafe/users/fbfortune/statuses/113244559263825293",
"activitypub"
]
],
"content": "Want to use sed(1) to edit a file in place? Well, to replace every 'e' with\nan 'o', in a file named 'foo', you can do:\n\n\tsed -i.bak s/e/o/g foo\n\nAnd you'll get a backup of the original in a file named 'foo.bak', but if you\nwant no backup:\n\n\tsed -i '' s/e/o/g foo",
"sig": "0e577ffb23f0d31607889416fce3634f21a1728b7ffea49adbbb77b0c13e711027409cd294670ae5fe17608af6db25347d063a73a226b4975394f6b72887a78b"
}