ibm-cloud-architecture / Learning-Kabanero-101

Tutorials for Cloud Native with Cloud Pak for Applications
https://ibm-cloud-architecture.github.io/Learning-Kabanero-101
Other
3 stars 9 forks source link

appsody deploy script example has sed portability issue #64

Closed timroster closed 4 years ago

timroster commented 4 years ago

MacOS and GNU sed differ in syntax for in-place editing of files. The most reliable way to get sed to work for both is to specify a backup extension and then delete the backup file. Something like:

sed -i'.bak' -e 's/foo/bar/' myfile && rm myfile.bak