diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2002-09-04 23:28:35 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2002-09-04 23:28:35 +0000 |
commit | d946bf789255a84ecbbbdfd07bffb48da063204f (patch) | |
tree | 78116bfb223e1373152524655f569c659e0597b2 /games | |
parent | b07316882941c58b436780ace834f24f22409766 (diff) | |
download | src-d946bf789255a84ecbbbdfd07bffb48da063204f.tar.gz src-d946bf789255a84ecbbbdfd07bffb48da063204f.zip |
Add a tip about using sed(1)'s FreeBSD-specific -i option.
MFC after: 42 days
Notes
Notes:
svn path=/head/; revision=102943
Diffstat (limited to 'games')
-rw-r--r-- | games/fortune/datfiles/freebsd-tips | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/games/fortune/datfiles/freebsd-tips b/games/fortune/datfiles/freebsd-tips index 26843faddab2..f0fbfdda8849 100644 --- a/games/fortune/datfiles/freebsd-tips +++ b/games/fortune/datfiles/freebsd-tips @@ -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 |