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
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 =...
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...
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...
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...
p5wizard,
Thanks, I made some changes and also looked at some other init.d scripts, but still get the same result. Works fine normally, but not at boot.
Here is what I changed:
#!/bin/bash
# Randomize MAC address
PATH=/usr/sbin:/usr/bin:/sbin:/bin
start()
{
NICS="$( /sbin/ifconfig -a |...
Hello,
I have put together a script for "macchanger" to run at startup, and give a random MAC to all interfaces. The problem I'm having is getting it to run at startup. I've done:
chmod a+x macchanger (makes it executable)
chmod 777 macchanger (gives appropriate permissions)
update-rc.d...
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.