The Different Commands between BSD Sed and GNU Sed

Replace string in the file.

GNU sed:

sed -i 's/original/new/g' test.txt

BSD sed. You have to specify a backup file, like:

sed -i .bak 's/original/new/g' test.txt

Comments

Popular posts from this blog

BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found

How To Install Nginx, MySQL and PHP (FEMP) Stack on FreeBSD 13.0

Install samba on FreeBSD(on VMware Workstation) to share files with Window.