HP Traffic Director Server Appliances sa7200/sa7220 and 8200/sa8220 - User Guide
C H A P T E R 5Pipes
135
Pipes
Any command’s output can be "piped" using the ’|’ symbol with
"grep" or "more."
• Redirecting a command to
more pages that command's output
regardless of the
config cli more setting.
• Redirecting a command to
grep displays only the command
output's lines that contain the word specified after
grep to be
displayed.
HP SA8220#info | grep SNMP
The above command filters the output of the info command using
grep such that only lines containing "SNMP" are displayed.
• Pipes to
grep can be cascaded.
HP SA8220/config/policygroup/test/service#
info | grep Primary | grep serv1.com
The above command displays only lines containing "Primary"
AND "serv1.com."
• The output of a command can be directed to both
grep and
more, but the pipe to more must be the last pipe present.
HP SA8220/config/policygroup/test/service#
info | grep Primary | grep serv1.com | more