Posts Tagged 'script'

Recursively Remove .svn Folders

I was moving my svn projects to git repository. I needed to get rid of all the .svn folders recursively. Following is the script that I used:

Popularity: 1% [Continue Reading ?

0

Groovy : Parse All Soccer Players Info

I am new to groovy and am still getting used to the scripting way of thing coming from Java. So as a learning exercise I wrote up the following lines to parse information of all the soccer players from ESPN Soccernet. I have used the Jsoup library to get the document and parse it.

def leagues = [
        "http://soccernet.espn.go.com/clubs/_/league/eng.1/english-premier-league?cc=4716",
        "http://soccernet.espn.go.com/clubs/_/league/esp.1/spanish-la-liga?cc=4716",
    ...
Continue Reading ?
0

Groovy : Invoking One Script From Another

It was like one of those Aha! moments when I finally found how to invoke one script from within another. It is so simple!!

Say you have a script RunScript.groovy which is as follows:

        package com.singhanuvrat.sandbox

        println "Whoa!! ${input}"

Now you want this RunScript.groovy to be called from CallerScript.groovy with different values for the variable input. Our script will be:

Continue Reading ?



0

Adding Startup And Shutdown Scripts in Ubuntu

I have my Ubuntu installed in Virtual Box. The very first thing that I needed to do was to setup my Ubuntu to recognize Windows drives. I setup two bash scripts to run at startup and shutdown. The following is what I have done.

anu@sw:/etc/init.d$ sudo vi vboxStartup
#!/bin/bash

# Mount the Win virtual drives - MyDocument, CShared, PidginWin
sudo mount -t vboxsf MyDocuments /mnt/MyDocuments
sudo mount -t vboxsf CShared /mnt/CShared
sudo mount -t vboxsf PidginWin /mnt/PidginWin

# Sync ...

Continue Reading ?
1