Why is sed changed not saved in yaml file?

Issue

My command

sed -e 's,kurtburak,JohnMarkovic,g' < values-override.yaml 

Screen shows what I expected

server:
  configEnabled: true
  config:
    repositories: |
      - type: git
        url: https://github.com/JohnMarkovic/argocd.git
      - name: argo-helm
        type: helm
        url: https://argoproj.github.io/argo-helm

But

cat values-override.yaml 

shows

server:
  configEnabled: true
  config:
    repositories: |
      - type: git
        url: https://github.com/kurtburak/argocd.git
      - name: argo-helm
        type: helm
        url: https://argoproj.github.io/argo-helm

If I change to

sed -i

got

sed: no input files

Why?

Solution

sed -i -e 's,kurtburak,JohnMarkovic,g' values-override.yaml 

Answered By – ElapsedSoul

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published