For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

kelemvor_50002's avatar
kelemvor_50002
Icon for Nimbostratus rankNimbostratus
Nov 05, 2013

Can I have a command take up multiple lines to make it easier to read?

With Bigpipe, I could write up a command that would take up multiple lines and then paste it into the prompt via a putty session to create various things. E.g.:

    bigpipe pool pool1 '{
   monitor all tcp
   members
      1.2.3.4:7035
      1.2.3.5:7035
      1.2.3.6:7035
         monitor tcp
}'

When I try to do something similar with tmsh, it doesn't work. If I create a pool/virt with one long line of settings, it works fine. If I try to break it up so it's readable like the example above, then it doesn't seem to work.

Is there a way to do this with the tmsh stuff? Cam I just missing something?

2 Replies

  • Technically no. TMSH doesn't allow you to insert newline characters in the command line. That said, you CAN use newline characters outside of the TM shell using regular Linux syntax.

    [root@bigip1:Active:Standalone] config  tmsh \
    > modify ltm pool local-pool \
    >   members add { \
    >     10.10.10.10:80 \
    >     10.10.10.11:80 \
    >   }
    

    Thankfully TMSH also ignore extra white space.

  • Can I also use this if I'm creating things in a Partition?

    Surprisingly that does work. Just specify the complete path to the pool.

    [root@bigip1:Active:Standalone] config  tmsh \
    > modify ltm pool /oracle/oracle-pool \
    >   members add { \
    >     10.10.10.10:80 \
    >     10.10.10.11:80 \
    >   }