Got it

Multiline regular expression output. How?

Created: Aug 11, 2020 06:29:23Latest reply: Aug 11, 2020 08:19:30 326 4 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Exsample:


[HUAWEI]display interface GigabitEthernet 0/0/22
GigabitEthernet0/0/22 current state : UP
Line protocol current state : UP
Description:cam187
[...]


I know description of interface. Then I would like GigabitEthernet number.

If i enter the command "display interface | include cam187", I get single-line output "Description:cam187".

I know there are regular expressions. But I cannot find a combination of them. 
What command should i enter to get multi-line output?
Such as:


GigabitEthernet0/0/22 current state : UP
Line protocol current state : UP
Description:cam187


Thanks.

Featured Answers
DDSN
Admin Created Aug 11, 2020 06:31:57

Hi Gigses,
You can use the display interface description command to display the description of a specified interface.

I hope it helps!

View more
  • x
  • convention:

All Answers
DDSN
DDSN Admin Created Aug 11, 2020 06:31:57

Hi Gigses,
You can use the display interface description command to display the description of a specified interface.

I hope it helps!

View more
  • x
  • convention:

I didn't know this command. Thank!
Still, how get multi-line output using regular expressions?
View more
  • x
  • convention:

deleted

View more
  • x
  • convention:

DDSN
DDSN Admin Created Aug 11, 2020 08:19:30

Some commands can carry the | count parameter to display the number of rows in the output result after the filtering condition is used.

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.