- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
cplane_pid=`pidof hnb_gw.exe`
if [ -z $cplane_pid ]
then
STATUS=`failure`
echo "Cplane hnbgw running $STATUS"
else
STATUS=`success`
echo "Cplane hnbgw running $STATUS"
fi
echo
最佳答案
如果hnb_gw.exe
有多个实例, pidof 将返回多个 pid。 -z
的 [
期望只有一个 pid。一种解决方案可能是使用 -s
pidof 的开关以仅返回一个 pid。
关于shell - "[: too many arguments"偶尔会出现 pidof,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17165138/
我想使用 pidof 或 ps 命令或任何命令找出 shell 脚本进程 ID。 我想要的只是它的进程ID。我使用过“pidof -x test.sh”。这是行不通的。注意:我不想调用/bin/sh
我编写了一个 C++ 程序来检查进程是否正在运行。这个过程在后台独立启动。我的程序在前台运行时工作正常,但当我安排时间时,它不工作。 int PID= ReadCommanOutput("pidof
在庆典中, pidof unison 将列出所有用户的统一进程。但是,我只对在我的 uid 下启动的实例感兴趣。 我怎样才能做到这一点? 我想做的:我定期使用 unison 在多台机器上同步多个帐户。
这是一个我无法弄清楚的小错误。当我输入 pidof 命令关闭进程时,命令行只是执行 pidof 并转到下一行,没有任何反应。没有错误消息,什么都没有。 例子: pidof supervisord 最佳
cplane_pid=`pidof hnb_gw.exe` if [ -z $cplane_pid ] then STATUS=`failure` ec
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
我有一个 CentOS 7 服务器虚拟机。在这个 VM 中,我安装了 Apache Apollo 我刚刚创建了下面给出的脚本 #!/bin/bash if pidof -x "apollo" >/de
专家, 如何查看 Linux shell 命令 pidof 的源代码?根据我在 GNU coreutils 中检查的相关问题的答案。它不在那里.. 最佳答案 如果您使用的是像 Ubuntu 这样的 D
我正在尝试在 Yocto 镜像中启动时运行服务。我的硬件是 x64,我从元骨架层复制了服务配方。 当我使用此服务刷新最新镜像并查看“ps”时,该服务未运行。 我手动跳转到init.d目录,执行./in
在批处理脚本中,我需要获取具有给定二进制路径 C:\path\to\binary.exe 的进程 ID 列表。在 Linux 中,我可以只执行 pidof/path/to/binary。 是否有从 W
我正在尝试通过运行来终止节点上的进程 kill -9 | pidof process 但是,这似乎不起作用。 存在多个进程可用的可能性。 所以我写了这个脚本,但我收到一条错误消息,说 kill_pro
在 bash 脚本中,我尝试使用以下行来确定是否有另一个进程正在执行当前脚本: /sbin/pidof -x $0 |wc -w 但响应始终为 2,而不是预期值 1。 我尝试了以下调用: /sbin/
我是一名优秀的程序员,十分优秀!