lobuhi / kindscaler

Node Management for KinD Clusters
46 stars 7 forks source link

sed errors out on OS X #2

Open saurabhsingh0308 opened 3 months ago

saurabhsingh0308 commented 3 months ago
+ [[ 2 =~ ^[0-9]+$ ]]
+ '[' 2 -gt 7 ']'
+ start_index=8
+ end_index=8
++ seq 8 8
+ for i in '$(seq $start_index $end_index)'
+ CONTAINER_NAME=kind-worker
+ docker cp kind-worker:/kind/kubeadm.conf kubeadm-8.conf
+ sed -i 's/kind-worker$/kind-worker8/g' ./kubeadm-8.conf
sed: 1: "./kubeadm-8.conf": invalid command code .
fishingfly commented 3 months ago

need help same problem @trozet @lobuhi

need a pull request to change to this:

sed -i '' 's/kind-worker$/kind-worker3/g' ./kubeadm-3.conf
FedericoAntoniazzi commented 1 month ago

Hello there, MacOS uses the BSD version of SED while linux uses the GNU implementation, but you can install gnu tools by using brew. Here's a link of a reference I used at the time: https://apple.stackexchange.com/questions/69223/how-to-replace-mac-os-x-utilities-with-gnu-core-utilities#69332