5 ms·
Try `sed -i ""` to avoid creating a backup.
by uberduper 6y ago
Try `sed -i ""` to avoid creating a backup.
- 1vuio0pswjnm7 6y agoWhen you use sed -i, a temporary file is always created. Using FreeBSD as an example, see references to "tmpfname" in main.c: https://raw.githubusercontent.com/freebsd/freebsd/master/usr.bin/sed/main.c https://raw.githubusercontent.com/freebsd/freebsd/master/usr... The naming scheme differs between seds. GNU prefixes the name with "sed" while BSD encloses it between two "!"'s. To see the name of the temporary file on BSD, something like ktrace sed -i 's/foo/bar/' file kdump ktrace.out|sed -n '/NAMI/p'