【发布时间】:2014-09-24 08:46:01
【问题描述】:
当我的服务器显示*** System restart required *** 时,我想知道是否有任何非常紧急的事项需要更新。为此,我可以按顺序执行以下操作:
cat /var/run/reboot-required.pkgs
# Which outputs something like:
# linux-image-3.13.0-36-generic
# linux-base
# dbus
aptitude changelog <package-name> | grep urgency=high
# If there is no output, there is no patch waiting with a high urgency
我现在想将这两个命令合并为一个,以便它自动循环第一个命令的输出,并将该行用作<package-name>。
有人知道我该怎么做吗?
【问题讨论】: