for loop is used to assign multiple values to single variable and run single command to multiple servers/variables so that if you want to repeat the command no need to typing multiple times. shell scripting tutorial helps you out to optimize your time. save time.