scripting

Has Lua a future as a general-purpose scripting language?

As already discussed in "Lua as a general-purpose scripting language?" Lua currently probably isn't the best scripting language for the desktop environment. But what do you think about the future? Will Lua get so popular that there will soon be enough libraries to be able to use it like Python, Ruby or something similar? Or will it sim...

Sql Server Management - Option to avoid scripting the collation?

I have databases with different collations. I want to be able to script out tables from one database and create them in another. However, when I script out the tables, it includes the collation in the column definitions. Is there a way to exclude the collations from the generated table creation scripts? ...

Locate the path of an Apache server on windows.

For a windows script I am writing, I need to detect if the machine has Apache 2.2 installed, and to find the application path. One solution I came up with is to wget http://localhost:8080/server-info and parse the root and the config file from it. This would fail if the server does not use port 8080 Another option would be to call “s...

Run a script when either locking or unlocking Windows XP

I have a Windows XP machine and a Linux machine running Ubuntu. I share the keyboard/mouse from the Windows machine via Synergy. What I would like to do is lock/unlock the Linux machine whenever I lock/unlock the Windows machine. So I'd like to be able to run a script of some description when Windows either locks or unlocks the screen. ...

Prevent 'cp' from outputting the file name from a bash script

I have a shell script which copies a few files to the current directory, compresses them, and streams the compressed file to stdout. On the client side I use plink to execute the script and stream stdin to a file. This almost works. It seems that the cp command outputs the file name being copied when its executed from inside the scrip...

Best IT/back-office system hacks?

Lots of people have things that their systems do for them or for their teams. Source control post-commit hooks are a standard example: have an automated build system that checks out the latest source, compiles, tests, and packages it is a back-office hack that most of us probably use. What other cool things have you done? ...

Automate SSH without using public key authentication or expect(1)

Is there a way to pass a password to ssh automatically. I would like to automatically ssh to a server without using public key authentication or expect scripts, by somehow getting ssh to read the password from stdin or a file. The reason it has to be that way is that I would like to backup my files to a server using rsync/ssh running as...

Batch Scripting Documentation

Is there some nice documentation for windows batch scripting I can download and refer to while offline? ...

The best way to process lists of email addresses

I have got 3 text files (A, B and C), each with several hundred email addresses. I want to merge list A and list B into a single file, ignoring differences in case and white space. Then I want to remove all emails in the new list that are in list C, again ignoring differences in case and white space. My programming language of choice is...

script language for flash and c++?

I spend hours every week coding my own personal projects. I have a nice C++ backend. For my next idea, it is small and lite enough to be done in flash. But i want to do it in a scripting language so i can call the code in my C++ projects. What script can i use in flash along with c++? ...

How to capture and display output from a task via Windows CMD

Hi, I've got a PHP script which I'm running from a command line (windows) that performs a variety of tasks, and the only output it gives is via 'print' statements which output direct to screen. What I want to do is capture this to a log file as well. I know I can do: php-cli script.php > log.txt But the problem with this approach...

How do I script an OLE component using Python?

I would like to use Python to script an application that advertises itself as providing an OLE component. How should I get started? I don't yet know what methods I need to call on the COMponents I will be accessing. Should I use win32com to load those components, and then start pressing 'tab' in IPython? ...

How do you see the STDOUT of a child process in the calling parent process in csh script

I am calling a csh script that the first thing it does is starts a new group. I need to be able to see the standard output from the child process that is executed after the fork. I also want the parent process to 'hang' unitl the child process is finished. Here is the script (razor_from_cgwin.sh). (sort of) newgrp name source /stuf...

Webservice with castor Serialzer

Does anyone know how to generate an axis webservice with castor serializer / deserializer? Current situation: axis webservice has to be build from wsdl with xsd and castor serialization build process has to be automated with an ant script the standard way is to create webservice sources with wsdl2java and then replace the pojos with t...

Ruby scripting on Windows

I'm making a simple script using ruby on a Windows 2003 Server. My questions are: How can I connect to a database through ODBC? I will be connecting to both Sybase on Solaris and MSSQL Server. How can I send emails through an Exchange Server 2003? Update What's the best simple IDE for Ruby scripting? I currently use SciTE (whic...

script for actionscript/flash and c++

I havent used flash or action script much. I am planning a small project that i'd like to be online via flash but i'd like to reuse the code in my c/c++ projects Is there a script language i can use? i am thinking lua or python. After googling i found flua which is incomplete and jython. Can i use java in flash? would it be a good idea ...

How to convert the value of %USERNAME% to lowercase within a Windows batch script?

I'm automating some source control software functionality using a dot bat script but given that our svn repos are hosted in a *NIX box, I'm facing the eternal case problem between these two worlds. Is there any cmd.exe function to convert the value of the Windows system variable %USERNAME% to lower case? Thanks much in advance! ...

Vb6 Performing an operation based on each line of a text file

I have a text file with a series of commands each one is on a diferent line what I need to do is go through the text file line by line and for each line perform a set of operations. How would I loop through line by line? Example: Text file contains: johndoe.log Apples and organes.log monkies and zebras.log script would grab line 1(...

What are some good powershell script repositories?

I know of a couple, and I've seen several blogs which include scripts sporadically, but I was wondering if there were any other good places to look. http://powershell.com/cs/media/13/default.aspx http://powershellcommunity.org/Scripts.aspx ...

Can I print html files (with images, css) from the command-line?

I want to print styled html pages with their images from a script. Can anyone suggest an open-source solution? I'm using linux (Ubuntu 8.04) but would be also be interested in solutions for other operating systems. ...