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-02-20 18:00:36Event JSON
{
"id": "b5d800474b208ccdb397d239a5a32088a83e6d04e4864a95cc52b3a96d573554",
"pubkey": "49792b0c3e803bb97f4005f83a8d6c09a58c6ea7f04e1ab19d149f9fabbbcee3",
"created_at": 1708452036,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.bsd.cafe/users/fbfortune/statuses/111965112652419934",
"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": "1176f3b43df9451b43e74cdc0c0c2d4a63f469b786b6bbd5e59744ebf4c0c2c87a170282e1ebe05f502961192f3946dfb5203a34a229d1932f33209093981ddb"
}