-1

I tried sed command at Mac's terminal but it is showing ">" and couldn't execute the command.

username$ oc get secret all-icr-io -n default -o yaml | sed 's/default/my-project/g’ | oc create -n my-project -f -
>

I got this command from here (③Copy the all-icr-io image pull secret from the default project to the project of your choice. The new image pull secrets are named <project_name>-icr--io.)

What I am trying to do is to copy OpenShift secret to from one namespace to another. "my-project" is existing project.

Moe
  • 9
  • 1
  • 4

1 Answers1

3

Don't use the "smart quotes", use the ASCII ones only. The shell thinks the quoted string hasn't been closed.

's/default/my-project/g’
                       ~
choroba
  • 231,213
  • 25
  • 204
  • 289