scripting

shell script -o operation is not working

DISPLAY_HEADER=1 if [ "$1" != "test" -o "$1" != "test2" ] then if [ $DISPLAY_HEADER == 1 ]; then DISPLAY_HEADER=0 echo "sdasa " echo $1 fi fi its display sdasa and -o is not working ? what is wrong ? ...

Shell Script - How to get stuff between two separators

Hi, I've got something like that: xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Microsoft Basic Optical Mouse id=8 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master...

C# stop webbrowser control from loading images, flash, script, etc

Hi, How can i stop the webbrowser from loading/displaying images, flash, script etc? I found this article that deals with it, but i dont know how to implement that "STDMETHODIMP CAtlBrCon::Invoke" function This is the link:article Can anyone point me into the right direction? ...

bash execute a shell function after a change directory (cd)

Trying to find a way to execute a function within BASH after changing into a directory. for example, # cd code/project/blah "Your latest modified files are main.cc blah.hpp blah.cc" (~/code/project/blah) # _ With the above I'm hoping to be able to wrap other functionality around the bash command. Was hoping to find something along t...

iTunes Application Loader - automation

Since recently Apple changed the iTunes Connect interface, and people are required to upload apps with the Application Loader. That's nice but I need a script for automating my work. How can an app like App Loader be automated? I was thinking of something written in AppleScript ... but I don't know what actions it exposes (if any). Fo...

Mac 'batchfile' script solution?

In Windows I would create a .bat file to run this script from my desktop, on my Mac how do I create something similar that can be run from the desktop to execute this: defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder ...

What is the correct way to run a custom ruby script from inside the script directory from Rails application? (Production environment)

link text I tried all of the answers from the above stack overflow post but none of them worked When I replace the #!/usr/bin/env ruby with the #!/path/to/my/script/runner and try to run Rails returns: /var/www/cmgmail/production/releases/20100810151610/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/conne...

Perl system command not acting as a normal prompt

I am trying to modify a perl script to comment out all lines matching some pattern. In normal command prompt, here is the line I'm trying to add: grep -lIRZ --exclude="*\.svn*" "pattern" . | xargs -0 -l sed -i -e 's/.*pattern.*/\/\/&/g' Here it is in the context of the perl script: my $rmcmd = "grep -lIRZ --exclude=\"*\\.svn*\" \"pa...

chrome extension memory hog with basic function

Hey all, I have a chrome extension thats very complex, but I'll simplify the issue which can be reproduced easily. manifest.json: { "name": "script", "version": "1.0", "description": "script", "browser_action": { "default_icon": "icon.jpg" }, "permissions": [ "tabs", "http://www.google.com/" ], "background_...

Recording from user mic w/o using Flash...

Is there a way to not to use flash as a platform for mic recording based script? ...

Creating BizTalk 2006 adapters programmatically

I'm writing a configuration script for a BizTalk server I need to create a few adapters. In the "BizTalk Server Administration" application this is done by going to Biztalk Server Group / Platform Settings / Adapters and choosing New / Adapter from the right-click menu. I'd like to automate this process somehow, using a Powershell sc...

Using a C Sharp file as a script file

Basically, I would like to be able to write a script file (in C# syntax) but then read this into an application so the application will execute the contents of the file. I don't want the script file to contain the namespaces etc. but the script file will be straight forward C#. For example a script file might look like: if (Balance ...

How to use awk to extract a quoted field?

I am using awk '{ printf "%s", $3 }' to extract some field from a space delimited line. Of course I get partial results when the field is quoted with free spaces inside. May any body suggest a solution please? ...

Lua Script Pattern Matching Problem

First of all, I have been using this site as a reference through the entire scripting process and it has been wonderful. I appreciate how useful and knowledgeable everyone is here. With that in mind, I have a question regarding matching (pattern matching) in Lua. I am writing a script that essentially takes input from a file and imports ...

fastest scripting programming language?

Hi all, I have a web application project where performances count more than anything else, and I have the choice of the technologies to use. The language shootout benchmarks that are not really related to web applications. What would you recommand as the best suitable candidates? Thanks! A friend suggested the gwan server on IR...

Enable SSL on Entourage

We're running Microsoft Entourage 2008 for email on our Mac systems. Until recently we have NOT been using SSL. Since we now have the certificate on the server we would like to change all accounts to use this. The problem is that we have a few hundred systems and this will take considerable time. Is anyone familiar of a script that will ...

Script to end process with a specific name

I have to kill two processes with the same image name (system and my local user name) every day. Is there a script that I could write or do I have to go to the task manager every time windows starts up? ...

In Powershell, what's the quickest way to tell if two files are different?

Given two files (in this case, largish CSV files), what's the most efficient way in Powershell to determine if their content differs? ...

bash quote problem

http://pastebin.com/GvZVS7a7 help please Edit Here's the code from the pastebin: d=`echo \"$1\"` echo $d #command run ./command 2 #expected output "2" ...

Access cookies || localSorage from content script - Chrome extension

Hi. Is there any way to access cookies || localSorage from content script? for example i have localStorage.shBox='true' and I want to access this from content script.. how can I make this? ...