Forum Discussion
Craig_T_232390
Nov 03, 2015Nimbostratus
Using Plink to run multiple commands
I have a fairly complex script which is trying to consolidate data into a text file using the following command:
c:\tools\plink.exe -batch ltmops@%IP% -pw ******* -m a.txt >tempA.txt
a port...
arpydays
Nov 03, 2015Nimbostratus
When run from bash you can suppress the prompt with -q and run multiple commands with -c. Shown below with and without -q. Sounds like you just need to connect to bash prompt and run tmsh -q "show ltm virtual" and pull out what you need.
cheers
tmsh -c "show sys clock; show sys connection"
-----------------------------
Sys::Clock
-----------------------------
Wed Nov 04 09:41:18 NZDT 2015
Really display all connections? (y/n)
tmsh -q -c "show sys clock; show sys connection"
-----------------------------
Sys::Clock
-----------------------------
Wed Nov 04 09:41:33 NZDT 2015
Sys::Connections
10.10.10.19:49332 10.11.11.11:8080 10.12.12.12:49332 10.13.13.13:8080 tcp 307 (slot/tmm: 1/1) none
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects