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
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
Post a Comment