On a running a customised kubectl command in bash terminal, it opens a yaml file in the vim editor, but i'm trying to replace a string without having to open an editor. (command is part of a bash script.)
kubectl deploy apps edit namespace | sed -i "s/version-tag:2.4.0.9/version-tag:2.4.0.10/"
Error:
sed: no input files
Vim: Warning: Output is not to a terminal
kubectl deploy apps edit namespace | sed -i -e "s/version-tag:2.4.0.9/version-tag:2.4.0.10/"
Error:
sed: -e expression #1, char 1: unknown command: `-' and no replacement happens.
I tried other options, by referring the suggestions on the forums, no luck though.. Where am I going wrong.