Article 511DF attempting to automate a process

attempting to automate a process

by
linuxman2020
from LinuxQuestions.org on (#511DF)
Currently I have created a loop but I don't seem to be getting the desired results:

CURDATE='date =%Y%m%d%h%M%S'
SCRIPT_PATH=~/TjsMYSCRIPTS
MyLogFileName=SCRIPT-"""CURDATE""".log
MYLOG=$SCRIPT_PATH/LOGS/"""$MyLogFIleName"""
MyKnownStrings=$SCRIPT_PATH/INPUTS/TestStrgs
MyCall="sysName"
CIPAdd=10.10.10.10

for Input_1 in 'awk -F: '(print $1)' $MyKnownStrings'
do
get -v 2c -c $Input_1 $CIPAdd $MyCall >> $MYLOG 2>&1
cat $MYLOG
done

==========================================================
This is a simple loop and for some reason it will not give me the get string I am looking for. It keeps skipping the Input_1 var, however, it works by itself. Then when I add the other 2 variables it skips the looping variable.

I have tried concatenating the variables into a new variable but for some reason that seems to wrap around on itself and over writes the beginning or at least that is what it appears to be doing.

My ultimate goal was to have a nested loop that would cycle through IP addresses once I clear the first part which I thought should have been simple.

help please.latest?d=yIl2AUoC8zA latest?i=fO5X-cUXPwg:-S1A0AE9xRU:F7zBnMy latest?i=fO5X-cUXPwg:-S1A0AE9xRU:V_sGLiP latest?d=qj6IDK7rITs latest?i=fO5X-cUXPwg:-S1A0AE9xRU:gIN9vFwfO5X-cUXPwg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments