mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Add a tip about using sed(1)'s FreeBSD-specific -i option.
MFC after: 42 days
This commit is contained in:
parent
b073168829
commit
d946bf7892
1 changed files with 10 additions and 0 deletions
|
|
@ -490,3 +490,13 @@ try the following pkg_info command.
|
|||
|
||||
pkg_info | sort | sed -e 's/-[0-9].*$//' | \
|
||||
uniq -c | grep -v '^[[:space:]]*1'
|
||||
%
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue