Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. krammer

    create multipe scheduled tasks

    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...
  2. krammer

    Replace, Left, and Right Functions

    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, ":", "$")
  3. krammer

    Replace, Left, and Right Functions

    I cut it down to 4 lines... strDBPath = iMBS.DBPath strDrive = Replace(strDBPath, Right(strDBPath,Len(strDBPath)-1), "$") strLocal = Right(strDBPath,Len(strDBPath)-2) strNetPath = strDrive & strLocal
  4. krammer

    Replace, Left, and Right Functions

    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
  5. krammer

    pycurl help

    ...HEADERS = ['Accept-Language: en-us,en;q=0.5', 'Accept-Encoding: gzip,deflate', 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Keep-Alive: 300', 'Connection: Keep-Alive'] # Request post page dev_null = StringIO.StringIO() pycurlConnect = pycurl.Curl() pycurlConnect.setopt(pycurl.URL...
  6. krammer

    pycurl help

    ...Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008071620 Firefox/3.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection...
  7. krammer

    VB script to Export Users Accounts from AD to a spread sheet

    ...strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_UserAccount",,48) strFile = "C:\export.xls" Set objExcel = CreateObject("Excel.Application") objExcel.Visible = False...
  8. krammer

    $RANDOM from file

    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.
  9. krammer

    $RANDOM from file

    :) It was useless wasn't it...thanks!
  10. krammer

    $RANDOM from file

    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...
  11. krammer

    $RANDOM from file

    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...
  12. krammer

    init.d script

    Thanks Annihilannic, I didn't realize that 777 includes the x to make it executable.
  13. krammer

    init.d script

    Thanks for the help.
  14. krammer

    init.d script

    ...-f 1 -d ' ') NICS=$(/sbin/ifconfig -a | /usr/bin/awk '/Link encap:Ethernet/{print $1}') for NIC in ${NICS} do /usr/bin/macchanger -r ${NIC/*:/} >/home/log 2>&1 /usr/bin/macchanger -r ${NIC} > /home/log 2>&1 /bin/sleep 1 done } case "$1" in start) start echo "**All NIC's are...
  15. krammer

    init.d script

    I forgot to put it in for sleep "/bin/sleep" but still the same.
  16. krammer

    init.d script

    ...NICS="$( /sbin/ifconfig -a | /bin/grep "Link encap:Ethernet" | /usr/bin/cut -f 1 -d " " )" for NIC in ${NICS} do /usr/bin/macchanger -r ${NIC/*:/} >/dev/null 2>&1 /usr/bin/macchanger -r ${NIC} > /dev/null 2>&1 sleep 1 done } case "$1" in start) start echo "**All MAC's are...
  17. krammer

    init.d script

    ...-a | grep "Link encap:Ethernet" | cut -f 1 -d " " )" # Randomize MAC address for NIC in ${NICS} do macchanger -r ${NIC/*:/} >/dev/null 2>&1 macchanger -r ${NIC} > /dev/null 2>&1 sleep 1 done ;; esac exit 0 I have also tried added the full...
  18. krammer

    Excel Replace Function with Format

    Ok...I thought what I gave was more then enough to figure out what I was asking. Don't worry about it then.
  19. krammer

    Excel Replace Function with Format

    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?
  20. krammer

    Excel Replace Function with Format

    Ummm, the second list doesn't matter, if the first one doesn't work then why would the second?

Part and Inventory Search

Back
Top