我已使用以下命令转发所有 postgres 服务
kubectl port-forward svc/data-postgres 5432:5432 &
Run Code Online (Sandbox Code Playgroud)
我现在想终止这个进程。我尝试了以下命令:
ps ax | egrep port-forward | egrep 'postgres' | sed 's/^\s*//' | cut -d' ' -f1 | xargs kill
Usage:
kill [options] <pid> [...]
Options:
<pid> [...] send signal to every <pid> listed
-<signal>, -s, --signal <signal>
specify the <signal> to be sent
-l, --list=[<signal>] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table
-h, --help display this help and …Run Code Online (Sandbox Code Playgroud) 我有一个具有某些属性 myprop.properties 的文件
a.b.c.d : '0'
a.b.c.e : 'hello'
a.b.c.f : 'hello1'
a.b.g.h : '123'
a.b.g.i : '4567'
http_port : false
install_java : true
Run Code Online (Sandbox Code Playgroud)
我想将此文件转储为 yaml 格式,因此预期输出应该是:
a:
b:
c:
- d: '0'
e: hello
f: hello1
g:
- h: '123'
i: '4567'
http_port : false
install_java : true
Run Code Online (Sandbox Code Playgroud)