Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Ubuntu:service --status-all不能与| more或| grep git
service --status-all
| more
| grep git
我看到一长串正在运行的服务,我只是无法按页面查看或过滤它。上述附加项不影响输出。
似乎service --status-all使用stderrand stdout。grep或more不影响stderr。我们需要使用重定向。
stderr
stdout
grep
more
service --status-all 2>&1 | grep git service --status-all 2>&1 | more
在一个 php 文件中,我有以下内容
<script id="svg-xml" type="text/template"> <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http