一些命令在寻呼机中显示它们的输出,并且不返回。这是此类命令的示例:
apt changelog zsh
从man apt
页面:
changelog
changelog downloads a package changelog and displays it through sensible-pager. The server name and
base directory is defined in the APT::Changelogs::Server variable (e. g.
http://packages.debian.org/changelogs for Debian or http://changelogs.ubuntu.com/changelogs for
Ubuntu). By default it displays the changelog for the version that is installed. However, you can
specify the same options as for the install command.
...但是没有任何关于将选项传递给 saidsensible-pager
或使用另一个选项。
我怎样才能得到它的前 N 行,更好的是,解析输出以提取我需要的信息?