scripting

Solution to programmatically generate an export script from a directory hierarchy

I often have the following scenario: in order to reproduce a bug for reporting, I create a small sample project, sometimes a maven multi module project. So there may be a hierarchy of directories and it will usually contain a few small text files. Standard procedure would of course be to create a zip file and send that. But on some maili...

Can android execute string as code?

So basically I would like my app to read info from a database, this info would be a string that is valid java code. Once read, I would like my app to execute this string as if it were code. Is there any functionality packaged with the android sdk that supports this? Essentially I want the phone to populate some data with information que...

How to use Powershell to Monitor a specific inbox for Commands?

I would like to set up functionality where a powershell script would access the email in a specific mailbox. It would then parse each email to engage in dialog with a specific set of users. To serve as a system that could be interacted with through email. How could this be pulled off? ...

Best language to parse extremely large Excel 2007 files

My boss has a habit of performing queries on our databases that return tens of thousands of rows and saving them into excel files. I, being the intern, constantly have to write scripts that work with the information from these files. Thus far I've tried VBScript and Powershell for my scripting needs. Both of these can take several min...

supplying inputs to stdin programatically line by line ?

I have a test program which prompts for input from user(stdin), and depending on inputs, it asks for other inputs, which also need to be entered. is there a way I can have a script do all this work ? ...

Automatically creating OpenOffice macros

Hi, I have written a system which makes use of OpenOffice.org to perform some file conversion. This will be deployed to a number of different servers and I want to make the installation process as easy as possible for the administrator that will be doing it. There are several macros that I have written that need to be added to each ins...

Python in OpenOffice 3

Hello, I have a heap of Lotus 123 spreadsheets (not written by me) with Lotus Scripts in them doing an awful lot of leg work (moving data from one spreadsheet to another, and other things like that). I am making the consideration of moving it all away from Lotus 98 and going to something a little more open, like OpenOffice. I was wonde...

hudson and building scripts

I have some code I run against other code. Let say command x runs code blah.c I have written a script to check to see if that command executed successfully. I am able to determine this. I will be running the script in the execute build box available in hudson. I need to know who to fail the build if any of there code tests fail. meani...

Consistent implementation of tr?

I have a ksh script that generates a long, random string using /dev/urandom and tr: STRING="$(cat /dev/urandom|tr -dc 'a-zA-Z0-9-_'|fold -w 64 |head -1)" On the Linux and AIX servers where I used this it resulted in 64 characters of upper and lower case alpha chars, digits, dash and underscore characters. Example: W-uch3_4fbnk34u2nc0...

Is Recursive Grep Really Better?; How to Improve PBS-based Bash Script?; and other Questions...

I work in a research group and we use the PBS queuing system. I'm no PBS master, but I wanted to script a search for if a job was running. To do this I first grab a string of all the jobs by using the results of a qstat call as my argument to qstat -f and then taking the detailed list of all jobs and searching it for the submitted file...

How do i run a Java program from the command line using an Eclipse launch file???

Hi, i've been given the task of creating a ksh script which runs one Java program multiple times and another once. The idea is that the multiple runs test the ability of the single program to handle multiple threads. The issue i am having is that i want to use a .Launch file generated by Eclipse to specify the run time dependencies of ...

Am I doing this right with OOP PHP ?

Hello, I'm now in the process of rewriting one of my script (contact script with ajax) with OOP PHP after I read a lot about its advantages. The script became longer but I think this is good in oop. I have read a lot of articles about how to code php using oop , but it's still confusing to me. The Code First look at this part of the...

windows script to detect and fix if the network adapter needs resetting

all, is there any script that I can put on a scheduler to auto reset adapter only if there is a network connection failure? I am running Windows 7 -Jeremy ...

What compile time features does Perl provide that other languages don't?

Is Perl considered a general purpose programming language? Reading about it on Wikipedia Perl has a Turing-complete grammar because parsing can be affected by run-time code executed during the compile phase.[41] Therefore, Perl cannot be parsed by a straight Lex/Yacc lexer/parser combination. Instead, the interpreter implements its ...

Powershell - Check if file is in use

Is there a Powershell command to check if a file is in use by another user? If not, what would it take to write a script that can? ...

git plugin and hudson

I using Hudson as my continuous integrations tool. Now when pulling down sources from multiple git repositories. I am getting errors in my workspace only pulling down the last repository in the list and the build fails. I understand that when pull down from multiple git repositories multiple hidden .git directories are created in my wo...

How to Write a Scripting Language using C?

How to Write a Scripting Language using C? Any Idea? Links? ...

How to insert spreadsheet scripts UI service into google sites?

I create a UI in spreadsheet and need to share/use/embed it in Google site. How do I insert it? Updates: I have tried the following methods to display the apps script UI in Sites 1. added the service URL to gadget that loads iframe. 2. added the service url into a load/get jquery request in a simple html page. The only way the UI gets v...

working with file handles in Perl

I am writing a comparefiles subroutine in Perl that reads a line of text from one file (f1) and then searches for it in another (f2) in the normal O(n^2) way. sub comparefiles { my($f1, $f2) = @_; while(<f1>) { # reset f2 to the beginning of the file while(<f2>) { } } } sub someother { open (one,...

What does the $# construct mean in bash?(and in general I suppose)

I see foo() { if [[ $# -lt 1 ]]; then return 0 fi ... } What exactly is it comparing by using $# as it does there? ...