Hello,
I am trying to figure out how to write a script for multiple scheduled tasks for a single task. For example:
Run at 8pm Mon-Thu, 10pm Fri and at 8am on the last day of each month. So you see I want to use different times, 8pm, 10pm and so on. This is just an example, there will be...
Ok I don't know why I was making this so complicated...all I had to do was replace a colon!
strLocalPath = iMBS.DBPath
strNetPath = Replace(strLocalPath, ":", "$")
Any idea's on how to make these statements any shorter?
strDrive = iMBS.DBPath
strDrive = (Left(strDrive,1))
strDrive = Replace(strDrive, strDrive, strDrive & "$")
strPath = iMBS.DBPath
strPath = Right(strPath,Len(strPath)-2)
strNetPath = strDrive & strPath
Replacing this:
NAME=$(/usr/bin/awk '{print $'$number'}' /home/eric/names)
With this:
NAME=$(awk 'NR=='$number+1'{print;exit}' /home/eric/names)
Is much more accurate for how my text file is formatted, and it fixes getting numbers 1-10, instead of 0-9.
Yeah I didn't really want to count lol...
PHV - Single quotes are stronger than double quotes...That's all I really found when researching them...but I did play around with it. This works, and is what I was trying to do...but I don't know if its the best way or why it really works with the...
After the last post, I was interested in playing around with "awk." What I am trying to do now is choose a random number, and have "awk" use that random number for the line it will chose from a text file. What is happening is I am getting a constant loop of the whole text file...I got the code...
All I'm doing is trying to automate the process of coloring and renaming the cells in column C that have "warning" and "error" in them...does that help?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.