tagged [scripting]

Groovyscript grails system commands

Groovyscript grails system commands Is there a possibility of running my "grails run-app" command from my groovy script? I tried "cmd /c dir".execute() and it was working but "cmd /c grails run-app" d...

Execute Unit Tests using MsBuild command line

Execute Unit Tests using MsBuild command line I use scripting for this: And I build solution .sln Now, I would like execute all Unit Tests and check all is OK. How can I execute unit tests of .csproj ...

Global environment variables in a shell script

Global environment variables in a shell script How to set a global environment variable in a bash script? If I do stuff like ...or ...the vars seem to stay in the local context, whereas I'd like to ke...

C# Interpreter (without compilation)

C# Interpreter (without compilation) Is there a ready-to-use C# interpreter out there, that is does not rely on runtime compilation? My requirements are : - - - - - If this is not clear, I need someth...

7 Nov at 16:3

How to make an "alias" for a long path?

How to make an "alias" for a long path? I tried to make an "alias" for a path that I use often while shell scripting. I tried something, but it failed: How do I make it work ? However, `cd ~/Files/Scr...

3 Oct at 19:52

Store mysql query output into a shell variable

Store mysql query output into a shell variable I need a variable to hold results retrieved from the database. So far this is basically what I'm trying with no success. My understanding of bash command...

27 Nov at 01:6

Python script header

Python script header The typical header should be But I found below also works when executing the script like `$python ./my_script.py` What's difference between these 2 headers? What could be the prob...

27 Jun at 19:50

How can I remove the first line of a text file using bash/sed script?

How can I remove the first line of a text file using bash/sed script? I need to repeatedly remove the first line from a huge text file using a bash script. Right now I am using `sed -i -e "1d" $FILE` ...

15 Sep at 01:18

C#/.NET scripting library

C#/.NET scripting library I want to enhance an application with scripting support like many other applications have, e.g. [MS Office using VBA](http://en.wikipedia.org/wiki/Visual_Basic_for_Applicatio...

4 Dec at 23:43

SQL Server - stop or break execution of a SQL script

SQL Server - stop or break execution of a SQL script Is there a way to immediately stop execution of a SQL script in SQL server, like a "break" or "exit" command? I have a script that does some valida...

2 Dec at 14:52

How to get the Parent's parent directory in Powershell?

How to get the Parent's parent directory in Powershell? So if I have a directory stored in a variable, say: Now I would like to find the directory parent levels up. I need a nice way of doing: Can I g...

15 Mar at 18:3

Basic Dual Contouring Theory

Basic Dual Contouring Theory I've been searching on google, but cannot find anything basic. In it's most basic form, how is dual contouring (for a voxel terrain) implememted? I know what it does, and ...

27 Jun at 06:31

How to redirect the output of a PowerShell to a file during its execution

How to redirect the output of a PowerShell to a file during its execution I have a PowerShell script for which I would like to redirect the output to a file. The problem is that I cannot change the wa...

11 Jul at 23:39

How can I declare and use Boolean variables in a shell script?

How can I declare and use Boolean variables in a shell script? I tried to declare a Boolean variable in a shell script using the following syntax: Is this correct? Also, if I wanted to update that var...

23 Oct at 12:16

How to run a script at a certain time on Linux?

How to run a script at a certain time on Linux? I have a I want to be able to How would you achieve that? Create another script that runs in background (sort of a deamon) and checks every second if t...

19 Jun at 16:47

How can I suppress all output from a command using Bash?

How can I suppress all output from a command using Bash? I have a Bash script that runs a program with parameters. That program outputs some status (doing this, doing that...). There isn't any option ...

21 Feb at 19:50

How do I remove newlines from a text file?

How do I remove newlines from a text file? I have the following data, and I need to put it all into one line. I have this: I need this: --- # EDIT None of these commands is working perfectly. Most of ...

23 Jul at 15:46

How do I script a "yes" response for installing programs?

How do I script a "yes" response for installing programs? I work with Amazon Linux instances and I have a couple scripts to populate data and install all the programs I work with, but a couple of the ...

7 Oct at 08:19

How can I write and append using echo command to a file

How can I write and append using echo command to a file I am trying to write a script which will use echo and write/append to a file. But I have " " in syntax already in strings .. say .. Can anyone p...

19 Jun at 10:48

How to get started with PowerShell?

How to get started with PowerShell? I played with one of the early beta versions of PowerShell V1, but haven't used it since it went "gold". What is the best way to get started using PowerShell? Which...

10 Nov at 22:23

Can I create a One-Time-Use Function in a Script or Stored Procedure?

Can I create a One-Time-Use Function in a Script or Stored Procedure? In SQL Server 2005, is there a concept of a one-time-use, or local function declared inside of a SQL script or Stored Procedure? I...

Checking if a website is up via Python

Checking if a website is up via Python By using python, how can I check if a website is up? From what I read, I need to check the "HTTP HEAD" and see status code "200 OK", but how to do so ? Cheers ##...

How can I ssh directly to a particular directory?

How can I ssh directly to a particular directory? I often have to login to one of several servers and go to one of several directories on those machines. Currently I do something of this sort: I have ...

9 Mar at 14:52

Batch file to "Script" a Database

Batch file to "Script" a Database Is it possible to somehow use a file to script the schema and/or content of a SQL Server database? I can do this via the wizard, but would like to streamline the crea...

Shell script to send email

Shell script to send email I am on linux machine and I monitor a process usage. Most of the time I will be away from my system and I have access to internet on my device. So I planned to write a shell...

11 Jan at 13:49