Hi
I've been trying to find some tutorials on writing hook scripts, and so far my search has been pretty fruitless. Can anyone point me in the direction of a good source? I've checked the SVN book, but can't find anything that detailed in there (although I may simply not have looked in the right place).
any help is appreciated. BTW: I si...
I'm not sure if this is possible or not.
What I'm looking for is a way to tell telnet to use a certain IP address to log into and then run commands where the commands change based on a user's MAC address.
Basically it would be:
tell telnet to use x.x.x.x as the IP to log into and put in the correct username and password
tell telnet t...
I am writing a shell script and I am stuck. The requirement is: I will receive files which have a sequence number on them like xyz0001abcd.DAT. I create a copy of that file, keeping the sequence number, as abcd000001gfh.DAT. The original filename uses four digits (up to 9999), and the copied one uses six (up to 999999).
I am stuck when...
I need to write a script that go to a web site, logs in, navigates to a page and downloads (and after that parse) the html of that page.
What I want is a standalone script, not a script that controls Firefox. I don't need any javascript support in that just simple html navigation.
If nothing easy to do this exists.. well then something...
Background: Every work day I get an e-mail from a vendor who sends me a CSV file as an attachment. The CSV file needs to be converted into HTML and I already have a script that does that.
The problem is, I have to manually open my e-mail, save the attachment to my hard drive and then run the script against the saved attachment. I would ...
When using a long running script which writes to an open text files, say for logging, which is the better approach: open a file, write to it as needed, and then close when done? Or open the file, write to it, and immediately close it every time? I can see advantages and disadvantages to both.
Any thoughts or experiences?
...
I'm creating a script to only upload zip files and I have the following validation allready:
if($itemtype != "application/x-zip-compressed"
&& $itemtype != "application/zip" && $itemtype != "application/octet-stream") {
throw new exception("Your file should be a zip file!");
}
but I have a file with file type application/force-do...
Hi guys. Found this Reboot Vista.vbs script on a number of forums. Seems like the whole post ( text including the code ) was posted on many forums. So I don't know who the original author is. Heres the code here:
Option Explicit
On Error Resume Next
Dim Wsh, Time1, Time2, Result, PathFile, MsgResult, MsgA, AppName, KeyA, KeyB, TimeDiff
...
I'm facing a small problem here, I want to pass a string containing whitespaces , to another program such that the whole string is treated as a command line argument.
In short I want to execute a command of the following structure through a bash shell script:
command_name -a arg1 -b arg2 -c "arg with whitespaces here"
But no matter how...
I'm sure something like this exists, but I can't for the life of me remember what it is called.
I'm looking for an app where I can just execute an arbitrary block of C# code and see any console output.
...
i have two files ...
file1:
002009092312291100098420090922111
010555101070002956200453T+00001190.81+00001295.920010.87P
010555101070002956200449J+00003128.85+00003693.90+00003128
010555101070002956200176H+00000281.14+00000300.32+00000281
file2:
002009092410521000098420090709111
010560458520002547500432M+00001822.88+00001592.96+00001...
My company has traditionally used a Linux command line development environment. We use a script to manage the PATH and LD_LIBRARY_PATH environment variables when compiling and running. This script is called by adding it to the beginning of a command, like this:
sbs make
sbs ../bin/foo.exe
I am trying to get our code to run from Ecli...
I'm trying to create a syntax file and I want to create some keyword groups for different colour highlighting (e.g. reserved words, operators etc. would be different colours). I can get this to work by doing one of the following two options:
Option 1
syn keyword MyLangOperators operator1 operator2 operator3
syn keyword MyLangOperators ...
I've found a great little program that will allow me to add user friendly GUI's to my Bash Scripts;
whiptail
However the whiptail man page isn't all that helpful and doesn't provide any examples. After doing some google searches I understand how to create a simple yes/no menu using whiptail:
#! /bin/bash
# http://archives.seul.org/s...
I have a site built with simple templates; header.tpl, navigation.tpl, body_home.tpl, body_about.tpl, body_anotherpage.tpl, etc. The navigation.tpl contains jQuery and is used to dynamically build a drop down navigation menu. When an element is clicked on the first drop down menu, the next is built based on what element was clicked. At s...
This is the evolution of these two questions, here, and here.
For mine own learning, I'm trying to accomplish two (more) things with the code below:
Instead of invoking my script with # myscript -F "," file_to_process, how can I fold in the '-F ","' part into the script itself?
How can I initialize a variable, so that I only assign a ...
ActiveState Perl installs an IIS script mapping for the extension .plx. Is this actually used in real life or just something specific to ActiveState?
...
Hi,
I have a command CMD called from my main bourne shell script that takes forever.
I want to modify the script as follows:
Run the command CMD in parallel as a background process ($CMD &).
In the main script, have a loop to monitor the spawned command every few seconds. The loop also echoes some messages to stdout indicating progr...
I wanted a simple git command to go up to the "root" of the repository.
I started with a script, but figured that I cannot change active directory of the shell, I had to do a function. Unfortunately, I cannot call it directly with the non-dash form "git root", for instance.
function git-root() {
if [ -d .git ]; then
return 0
fi
A...
I have a fairly sophisticated server-side application which frequently requires me to see what is going on with its internals to debug and fix problems.
I've therefore embedded a Beanshell instance, which I can telnet into (normally over a ssh tunnel), but I'm wondering if there is a better way.
A few limitations:
No readline support...