Forum Discussion
How to auto yes to tmsh show command ?
Hello,
I would have one problem in tmsh. From bash I could check the configured virtual servers name :
From bash
echo yes | tmsh show ltm virtual | grep $ tmsh -q show ltm virtual | grep $
but the question is, how could I check it directly from tmsh ? My problem is that when I made a script it always wait for input yes, if it is possible I would use a correct command which doesn't wait for input.
show ltm virtual | grep $ Display all 630 items? (y/n)
At this moment to use bash would be problematic. Please let me know if you have any solution for this in tmsh.
Best Regards,
Csaba
4 Replies
- nitass
Employee
can you try this?
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) modify cli preference pager disabled display-threshold 0 root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list cli preference cli preference { alias-path { /Common } display-threshold 0 pager disabled prompt { host user status current-folder config-sync-status } suppress-warnings { } }
- Hamish
Cirrocumulus
Nitas has already answered your tmsh CLI question, but from bash, normally tmsh detects when you're running interactive or not (i.e. redirect to a pipe). And ONLy asks for confirmation when you're interactive. For Example
bash tmsh show ltm virtual | grep CPU
will NOT prompt for all objects and simply send all the output to the pipe for passing to grep.
So from bash your 'echo yes |' is wasted cycles...
H
- jlarger
Cirrus
Use the tmsh -q switch from bash: tmsh -q show ltm virtual No 'less' prompt. Use wisely - you should have an idea just how lengthy the request is before you let it off the 'less' leash.
Tested on v11.6.3.
- pponte
Altostratus
Hello,
Does anyone know hot to disable paging in 14.2?
I have done it as usual but keeps prompting if I really want to display all the output.
a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# modify cli preference pager disabled display-threshold 0 a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# save /sys config partitions all Saving running configuration... /config/bigip.conf /config/bigip_base.conf /config/bigip_script.conf /config/bigip_user.conf a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# quit a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# a7246590@(ALCF5LB-INTRANET)(cfg-sync In Sync)(Active)(/Common)(tmos)# show sys connection Really display 1000 connections? (y/n) n
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com