scripting

Is there a useful scripting language to refactor code?

I've looked at JunGL, and it looks far too complicated for real use and is overly general. A tool like this would be useful for providing an alternative version of a language port, which would utilize more advanced language features/conventions. ...

Stop slow-loading script with GreaseMonkey

On a page that I visit, it has a slow-loading external script that occasionally takes so long that the page is basically unusable. Disabling this script entirely removes some functionality, but it's better than nothing. Is there a way I could use greasemonkey to cancel the script? I know I could use NoScript, but I wanted to give it a...

Running a Python Script on a server (Does it have to be in /cgi-bin/)?

Right now I have a script thats http://www.example.com/cgi-bin/foo?var1=A&var2=B Is there a way that I can have it run outside of the cgi-bin directory? Like could I have http://www.example.com/foo/?var1=A&var2=B Thanks! ...

Pass ALL Arguments from Bash Script to Another Command

What is the simplest way to grab all the given arguments for a bash script and pass them all into another command within the script? For example: Command Line: ./runProgram.sh [ARGS HERE] Script: #! /bin/bash cd bin/ java com.myserver.Program [ARGS HERE] ...

How does sympy work? How does it interact with the interactive Python shell, and how does the interactive Python shell work?

What happens internally when I press Enter? My motivation for asking, besides plain curiosity, is to figure out what happens when you from sympy import * and enter an expression. How does it go from Enter to calling __sympifyit_wrapper(a,b) in sympy.core.decorators? (That's the first place winpdb took me when I tried inspecting an...

Scripting Languages

I am looking for a good scripting language to link to my program. I am looking for 2 important attributes: Scripting language should be hard linked into the executable (not requiring 3rd party installations). This is important to me to simplify distribution. Scripting should allow some run-time debugging option (When running a script ...

Hudson and SVN repo

I am using hudson as my continuous integration tool. I need to download from my svn a zip file. It gives me the following error -- /somedir/*.zip refers to a file, not a directory! I know that. Is it not possible to check out a zip file. Once that is done I would like to run a script that extracts it, and sets up a directory struct...

Do commands run from current direcotry in a shell script?

In a bash shell script. I tried these two versions: java -jar abc.jar& and CMD="java -jar abc.jar&" $CMD The first verison works, and the second version complains that abc.jar cannot be found. Why? ...

array to hash in perl

I have a source list from which I am picking up random items and populating the destination list. The item that are in the list have a particular format. For example: item1{'name'} item1{'date'} etc and many more fields. while inserting into the destination list I check for unique names on items and insert it into that list. For this...

how do you change focus to a javascript thickbox in Visual basic

How do you change focus to a javascript thickbox in Visual basic script ...

HOWTO: Detect bash from shell script

The scenario is that users are asked to source a script file: $ source envsetup.sh This script file may use bash only feature so we have detect the running shell is bash or not. For other shells that share common syntax with bash, for example, sh, zsh, ksh, I'd like to report a warning. What is the most reliable way to detect the cu...

How do I convert a bash shell script to a .bat file?

Hi, I have a bash shell script on my Mac, that I need to convert to a .bat file (at least, that's what I've been told) for users that are on PCs. I was wondering the best way to go about this, or if anyone knows of any good references. I don't seem to be asking Google the right question to point me in the right direction. Specificall...

Permission Denied while running vb script

I have written a vb script to open a file with different filetype other than the original filetype(eg : from .doc filetype to .txt filetype) below is my code Dim objShell Set objShell = CreateObject("WScript.Shell") objShell.Run("notepad" & "C:\OpenWith_Shell32_Doc.doc") the above code was working fine but one day i edited the 'notep...

How can I spawn a long running process in a Perl CGI script?

I'm writing a Perl CGI script right now but it's becoming a resource hog and it keeps getting killed by my web host because I keep hitting my process memory limit. I was wondering if there is a way I can split the script I have into multiple scripts and then have the first script call the next script then exit so the entire script isn't...

How to use a bash script variable with sed

I execute the following bash script: #!/bin/bash version=$1 echo $version sed 's/\${version.number}/$version/' template.txt > readme.txt I'm expecting to replace all instances of ${version.number} with the contents of the variable "version". Instead the literal text $version is being inserted. What do I need to do to make sed use the...

Difference between Rscript and littler

...besides the fact that Rscript is invoked with #!/usr/bin/env Rscript and littler with #!/usr/local/bin/r (on my system) in first line of script file. I've found certain differences in execution speed (seems like littler is a bit slower). I've created two dummy scripts, ran each 1000 times and compared average execution time. Here's...

How do I handle spaces in a script that uses the results of find in a for loop?

I am trying to write a simple command that searches through a music directory for all files of a certain type and copies them to a new directory. I would be fine if the files didn't have spaces. I'm using a script from the following question, but it fails for spaces: http://stackoverflow.com/questions/2640260/bash-script-problem-find-mv...

ssh to different machine to find the number of file.

echo "`${BOLD}` ***** Checking CoreFile Creation *****`${UNBOLD}`" echo "========================================================" IFS='|' cat configMachineDetails.txt | grep -v "^#" | while read MachineType UserName MachineName do export CHK_COREFILE=`ssh -f -T ${UserName}@${MachineName} ls ~/corefiles ...

Create initial data sqlscripts with binary data, sqlserver 2005

Hi all, with a TFS 2008 Teambuildtype we create a ClickOnce Setup for a review version of our application. Within this Teambuildtype we create an initial database with some data to start directly with tests. Now i need to put some binary data in our sql script insert files (Wordfiles). How can i create a initial script with the binary...

Dealing with newline character in database reports

Newbie question here. I have a web form with a text area and naturally users will enter newline characters also. I am storing this form to a table in the DB. I also have to create a report from this. So I dump the table to text and am trying to parse it. The delimiters for me between multiple records is a new line character. But the new...