Joel_Breton
Jun 29, 2017Nimbostratus
Running multiple tmsh commands
I'm trying to run multiple commands to change the names of BIG-IP objects. I tried two methods without any success.
Method 1: Copy all the commands and paste in the putty session
Problem: When I paste the commands the putty session gets all messed up and the commands are not complete
[root@localhost:Active:Standalone] ~ tmsh mv ltm node /mypart/10.1.1.1 /mypart/newname1
[root@localhost:Active:Standalone] ~ tmsh
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos) tmsh mv ltm node /mypart/10.1.1.2 /mypart/newname2
Syntax Error: unexpected argument "tmsh"
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos) tmsh m
Syntax Error: unexpected argument "tmsh"
Method 2: Create text file with all commands and launch it from bash
Problem: Invalid characters are added to the commands
[root@localhost:Active:Standalone] ~ sh -x renamenodes.txt
+ tmsh -q mv ltm node /mypart/10.1.1.1 $'/mypart/newname1\r'
) is invalid.he requested object name (/mypart/newname1
Content of renamenodes.txt
tmsh mv ltm node /mypart/10.1.1.1 /mypart/newname1
tmsh mv ltm node /mypart/10.1.1.2 /mypart/newname2
tmsh mv ltm node /mypart/10.1.1.3 /mypart/newname3
tmsh mv ltm node /mypart/10.1.1.4 /mypart/newname4