Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sed errors out on OS X #2

Open
saurabhsingh0308 opened this issue Jun 6, 2024 · 2 comments · May be fixed by #3
Open

sed errors out on OS X #2

saurabhsingh0308 opened this issue Jun 6, 2024 · 2 comments · May be fixed by #3

Comments

@saurabhsingh0308
Copy link

+ [[ 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
Copy link

fishingfly commented Jun 15, 2024

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

@fishingfly fishingfly linked a pull request Jun 15, 2024 that will close this issue
@FedericoAntoniazzi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants