scripting

bash shell date parsing, start with specifc date and loop through each day in month

Hi, I need to create a bash shell script starting with a day and then loop through each subsequent day formatting that output as %Y_%m_d I figure I can submit a start day and then another param for the number of days. My issue/question is how to set a DATE (that is not now) and then add a day. so my input would be 2010_04_01 6 my out...

shell scripting: search/replace & check file exist

I have a perl script (or any executable) E which will take a file foo.xml and write a file foo.txt. I use a Beowulf cluster to run E for a large number of XML files, but I'd like to write a simple job server script in shell (bash) which doesn't overwrite existing txt files. I'm currently doing something like #!/bin/sh PATTERN="[A-Z]...

In python, how do I drag and drop 1 or more files onto my script as arguments with absolute path? (for windows, linux, and mac)

I am writing a simple Python script with no GUI. I want to be able to drag and drop multiple files onto my python script and have access to their absolute paths inside of the script. How do I do this in Mac, Linux, and windows? For times sake, just Mac will be fine for now. I've googled this question and only found one related one but i...

A scripting langauge for Windows?

Possible Duplicates: Best official scripting language for Windows programmers Universal scripting language for Windows What tools and languages are available for windows shell scripting? I work in Windows and often find the need to code some script that manipulates files or basic string manipulation. Currently, I'm doing t...

Import SQL server database using batch

Hello, I need to import a database into a SQL Server instance using a batch script and the database is provided by an sql file. How can I do This? The SQL file was generated by the SQL Server management studio. ...

BrowserInteropHelper.HostScript is null in XBAP in Firefox

Hi, We're trying to use a full-trust XBAP as a sort-of-browser-independent bridge between Javascript and COM. .NET 4 allows scripting of XBAPs via BrowserInteropHelper.HostScript, and this does indeed work very nicely in Internet Explorer. The process is approximately: Script creates an iframe and sets the src to something like '../Xb...

is it possible to write a webapp that can download mails from exchange server 2007

It does not matter what programming language. Can anyone please give me an idea if this is possible and any tools or API's available please? ...

How many lines of code have been committed to my SVN repository?

How could I check how many lines of code have been committed to my SVN repository across all commits? ...

How can a PHP script detect if it has been invoked as a script or from the shell?

I have a PHP script on a webserver. This file is invoked via the shell by another program but it could still be run by the webserver in response to an HTTP request. How can the script determine the way it was invoked? ...

exiting script while running source scriptname over SSH

I have a script with a number of options in it one of the option sets is supposed to change the directory and then exit the script however running over ssh with the source to get it to change in the parent it exits SSH is there another way to do this so that it does not exit? my script is in the /usr/sbin directory. ...

Is there a way to jail in Javascript, so that the DOM isn't visible

I would really like to provide the user some scripting capabilities, while not giving it access to the more powerful features, like altering the DOM. That is, all input/output is tunneled thru a given interface. Like a kind of restricted javacsript. Example: If the interface is checkanswer(func) this are allowed: checkanswer( function ...

"mobile"-blogging - any ideas/existing solutions?

hi does anyone know any sort of app that lets users visit a page on their mobile phone, enter information and have it update the website i believe the term is "mobile-blogging" but there isn't all that much on google or, is there any good resources for coding pages specifically for a mobile phone? I could probably design a script to i...

shell script background

I have script like this : fullscript.sh if [ ! -f /opt/laks/linux-2.6.33.2.tar.bz2 ] then wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.2.tar.bz2 tar -xjf linux-2.6.33.2.tar.bz2 fi for i in $(seq 1 500); do touch /tmp/$i.txt done I'm downloading tar file and then decompress i...

Replacement for Azure SDK Powershell commandlets for deployments

Hi, We've run into an issue with the New-Deployment Azure Powershell commandlet timing out; we've put in a bug report with MS. While they gave us an explanation for it (the path and timeout threshold used to upload through commandlets is different then what's used by the web portal); they don't have a fix for us. We need to get this ru...

Running code/script as a result of a form submission in ASP.NET

An outside vendor did some html work for us, and I'm filling in the actual functionality. I have an issue that I need help with. He created a simple html page that is opened as a modal pop-up. It contains a form with a few input fields and a submit button. On submitting, an email should be sent using info from the input fields. I tu...

variables in batch scripts

I'm trying to set up a batch file to automatically deploy a php app to a web server. Basically, what I want is an entirely automated process: I would just give it a revision number from the repository and it would then export the files, upload via ftp and then update deployment info at the repo host (codebase). However, I'm starting ...

using javascript setTimeout to see if div has loaded

I'm loading remote data using dynamic script tags and JSON. the remote page that I'm displaying on my website has a div in it that I use to load content into. The problem is the javascript functions do not see the div as the page loads because it is remote data. if I set a timeout of about 300 it usually works and my javascipt can see t...

Sum of every N lines ; awk

I have a file containing data in a single column .. I have to find the sum of every 4 lines and print the sum That is, I have to compute sum of values from 0-3rd line sum of line 4 to 7,sum of lines 8 to 11 and so on ..... ...

Script to reformat XML file

Hello all, I am trying to change an XML file from one format to another and have no clue as to how to write a script for it. Can someone help, please? The source file looks like this: <Record> <FieldValue fieldName="rapportage_nihil" fieldValue="false" fieldValueIsNull="false" fieldValueNatural="false"/> <FieldValue fieldName=...

how to write a script that logs into an application and checks a page

Is it possible to write a script that will login to an application using uname/pwd? the username/password are not passed in through POST (they dont come in the URL) Basic steps I am looking for are: Visit url enter uname/pwd click a button click a link get the raw html to make sure it does not have 500 error Is that possible to do...