i need to telnet/ssh into these ip's, login with corresponding user, and give corresponding command.
I was thinking at a while loop, assigning for 1st line first word to $ip variable, 2nd word to $user var, 3rd word to $command variable, then execute required action and pass to next line.
Can you guys tell me if it's an easier approach than this, and how i can assign those variables based on a delimiter ?
As a start you could have a look into a while -loop combined with the read command. For the field separator most shells have the variable IFS you could alter.
Problem is that if i run it from browser doesn't seem to work (txt file does not modify, stays the same, showing first line); in shell code works as expected.
I've tried double-quoting, single-quoting the variable without succes.
Any ideas what am i doing wrong, or another option to do this?