Bsd sed: Difference between revisions

From wikinotes
No edit summary
Line 4: Line 4:
For overview see [[gnu sed]].
For overview see [[gnu sed]].


= BSD differences =
= Differences from GNU =
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 10: Line 10:
sed -i ".bak" "s_aaa_bbb_g" /path/to/file
sed -i ".bak" "s_aaa_bbb_g" /path/to/file
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- BSD differences -->
</blockquote><!-- Differences from GNU -->

Revision as of 14:04, 16 October 2021

Sed allows you to search/replace within lines/files.
See also gnu sed.

For overview see gnu sed.

Differences from GNU

# BSD replace file contents
sed -i ".bak" "s_aaa_bbb_g" /path/to/file