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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by krammer

  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

    Ok so I think I figured out the right data to use for this script based off of the captured wireshark data: #!/usr/bin/python import pycurl, StringIO # Constants USER_AGENT = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008071620 Firefox/3.0.1' LOGIN_URL =...
  6. krammer

    pycurl help

    I am trying to create a python script that will do a form submission or a "post". I have captured data from wireshark, but I'm not quite sure how to get what I need into python. Here is the captured data: C}bEL[@@}+N&,SP+>\.d /0POST /somesite/entry.do HTTP/1.1 Host: somesite.network.com...
  7. krammer

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

    Try this... On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_UserAccount",,48) strFile =...
  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

    It works! Here is final script: PHV- Why does this work now lol? #!/bin/bash # Randomize MAC address PATH=/usr/sbin:/usr/bin:/sbin:/bin start() { #NICS="$( /sbin/ifconfig -a | /bin/grep "Link encap:Ethernet" | /usr/bin/cut -f 1 -d " " )" #NICS=$(/sbin/ifconfig -a | /bin/grep 'Link...
  15. krammer

    init.d script

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

Part and Inventory Search

Back
Top