Help Filtering out Show output on Juniper routers
kurosaki00
Member Posts: 973
in Off-Topic
Hello,
Was wondering if you guys can help me out filtering some stuff on Juniper routers.
If I do a show description
I get something like this:
t1-2/0/4:11 UP UP ThisstuffdontwantT12020no
I want the output just to display "T12020" and thats it. filter out everything else.
Any idea on how to do this?
Thanks
Was wondering if you guys can help me out filtering some stuff on Juniper routers.
If I do a show description
I get something like this:
t1-2/0/4:11 UP UP ThisstuffdontwantT12020no
I want the output just to display "T12020" and thats it. filter out everything else.
Any idea on how to do this?
Thanks
meh
Comments
-
networker050184 Mod Posts: 11,962 ModAre you trying to do it on the CLI? If so you will probably need an OP script to pull out the parts you want for display.An expert is a man who has made all the mistakes which can be made.
-
kurosaki00 Member Posts: 973Yep from the CLI
only read access =\
I can trim columns n stuff, but yeah having a hard time filter for example from a point onwards or something like that.
So its probably not possible without a script?meh -
networker050184 Mod Posts: 11,962 ModNope no way that I know of to filter out info on a single line. You can match on strings but the whole line is displayed. You could capture the output and then use a bash or other type script on another server to pull it out as well if you are really interested in making it happen.An expert is a man who has made all the mistakes which can be made.
-
kurosaki00 Member Posts: 973Was wondering if it could be done (would make my life easier).
But yeah... I guess make some kind of script, maybe do it in excel without much work.
Anyways, thanks networker!
This thread can be closed.meh