How install ruby in shell windows

How install ruby in windows shell ? i created project with ocra but project need Ruby for run I meant it: on install file(install.exe) require ‘win32ole’‘Shell.Application’) shell.ShellExecute(“install ruby”) What are my replace in ShellExecute ? (notice:This project need AutoItx3) Source: shell

I want to execute a cygwin script from maven’s pom.xml

I need to execute a shell script under cygwin, because I’m under Windows. The shell is executed but the commands arent’ recognize … See below : <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>openOCD</id> <phase>validate</phase> <configuration combine.self=”override”> <tasks> <exec executable=”C:/cygwin/bin/sh.exe” failonerror=”true”> <arg line=”${project.basedir}/” /> </exec> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> The for the moment…
Read more

awk command to take a variable

I have a txt file with 3 rows, now I want to multiply a variable value with the 2nd column. Given below is my requirement. cat sample.txt ABC,123,qwe123 ASD,456,asd123 VBN,6532,wqe123 I have a variable, colum=100. I want to multiply this variable with 2nd column using awk. The code I tried is: cat sample.txt | awk -F , ‘{print $1″,”$2*$($colum)”,”$3}’ My…
Read more

Windows 7 scheduled tast for Cakephp shell

I’ve made a Cakephp shell that puts the weatherforecast in my database. It works fine when I navigate and launch it with Git Bash, but now I want to run a scheduled task on my Windows pc to launch it every 15 minutes. After my scheduled task setup, I see every 15 minutes a cmd job running on my screen,…
Read more

How to create a shell script to launch 3 terminals and execute a set of commands in each?

Currently, I open 3 terminals (‘openocd session’,’telnet session’ & ‘gdb session’) and execute ‘a set of commands’ in each terminal every time I flash my image on target. Is is possible to put this in one shell script file and run at once? (Commands on each terminal are NOT dependent on others; except that the terminals should be opened in…
Read more

renaming file name and mask with unknown file format.

I have files mask below. with a very complicated file names. An example is show below. The unique identifier for the files is the number 0003915. I need to rename the file from From ‘journal.pks.0003915&representation=PDF’ to ‘journal.pks.0003915.pdf’ However the most intresting thing is that I have about 5000 files in folders and subfolders. And I dont know these numbers. I…
Read more

shell: Replacing a part of Line in a file

I am new to shell programming and had to do the following task. I have a file with following line at line number 28 (static). page.sysauth = “Admin” I wanted to replace this line using a shell script each time a new entry to sysauth be made. page.sysauth = {“Admin”, “root”} page.sysauth = {“Admin”, “root”, “newAdmin”} etc. Also I would…
Read more

Script shell for renaming and rearranging files

I would like to rearrange and rename files. I have this tree structure of files : ada/rda/0.05/ ada/rda/0.05/ ada/rda/0.05/ ada/rda/0.1/ ada/rda/0.1/ ada/rda/0.1/ I want that files will be renamed and rearranged like this structure below: ada/rda/ ada/rda/ ada/rda/ ada/rda/ ada/rda/ ada/rda/ Source: shell