Forum Discussion
qe_102628
Nimbostratus
grep works on a linefeed boundary, whereas the tmsh output contains multiple lines.
While you can't do this in tmsh since the grep doesn't support -A there, you could use something like this on the command line:
tmsh show ltm virtual|grep ^Ltm:: -A5|grep -e 'Ltm::\|\ \ Availability\|\ \ State'
here's me running that:
[root@snk-5:Active:Standalone] config tmsh show ltm virtual|grep ^Ltm:: -A5|grep -e '^Ltm::\|^\ \ Availability\|^\ \ State'
Ltm::Virtual Server: next4p81
Availability : unknown
State : enabled
Ltm::Virtual Server: next4p82
Availability : unknown
State : enabled
Ltm::Virtual Server: next6p81
Availability : unknown
State : enabled
Ltm::Virtual Server: next6p82
Availability : unknown
State : enabled
[root@snk-5:Active:Standalone] config
Sreenivasa_P
Jul 11, 2016Nimbostratus
how to read before and after line like in v10 we have command -a5 or -b5 but its not working in v11