I am trying to understand a bash expression
oc process -f build/my-build-template.yaml GITSERVER=$GITSERVER | oc create -f -
found here: https://github.com/openshift/origin/issues/15474
This is an example from the OpenSift API. The first part oc process -f build/my-build-template.yaml GITSERVER=$GITSERVER
returns some JSON:
I understand, that this JSON will be the input for the oc create -f <EXPECT FILE AS INPUT HERE>
which expects a file.
What is the purpose of the last -
in the ... | oc create -f -
Many tools allow specification of standard input as a filename of "-". This allows the pipe to work as expected without requiring a shell- or OS-based workaround.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With