background preloader

Bash scripting Tutorial

Bash scripting Tutorial

Eclipse RCP Tutorial Building Eclipse RCP applications based on Eclipse 4 Copyright © 2009 , 2010 , 2011 , 2012 , 2013 Lars Vogel Eclipse e4 This tutorial gives an overview about the Eclipse 4 application platform. This tutorial describes the creation of Eclipse 4 based applications, e.g. The Eclipse platform and IDE is released every year. As of 2012 the main Eclipse release carried the major version number 4, e.g. The Eclipse 4 platform is based on a flexible and extendible programming model. 1.2. The major enhancements in Eclipse 4 compared to Eclipse 3.x are the following: An Eclipse application consists of several Eclipse components. This book uses the terms Eclipse based applications, Eclipse application, Eclipse 4 application and Eclipse RCP application interchangeably for referring to an application which is based on the Eclipse 4 framework. If a certain concept refers to Eclipse 3.x, then it is explicitly stated. 2. 2.1. An Eclipse application consists of individual software components. Note 2.2. 2.3.

Shell Scripts - Learn Linux LINUX CLASSES - PROGRAMMING So how do you run this little wonder of technology? In DOS, all you have to do is name a file with a .bat extension and it'll be recognized as an executable file--but not so with Linux. Since Linux attaches no meaning to file extensions, you have to mark the file as executable by using the chmod command, like this: $ chmod +x deltemp The x marks the file as executable; if you list the permissions for the deltemp file afterward, you will see the x in position four, confirming this: $ ls -l deltemp -rwx------ 1 hermie other 55 Feb 19 14:02 deltemp If you want other users to be able to run this script, give them both read and execute permission, like so: $ chmod ugo+rx deltemp $ ls -l deltemp -rwxr-xr-x 1 hermie other 55 Feb 19 14:04 deltemp Now the permissions show that any user can view or execute the deltemp script, but only you can modify it. $ . Note: If the current directory is in the PATH environment variable, you can omit the ./ before the name. . setvar

Where did svn go after upgrading to OS X Mountain Lion 10.8 - Three Eyed Bird | Minneapolis - St. Paul Web Development and Design We want to warn our blog followers first, this is going to be quite a bit more techy so if you are not interested in those kind of things, you'll want to avoid this post, otherwise, read ahead! We recently discovered after upgrading to OS X Mountain Lion here at the nest that when we went to use SVN that the command was no longer found. It seems that Apple has removed the binary from normal OS X installs. Wait, what is SVN SVN, or subversion, is an open source version control system. Ok, so whats the deal and how do I fix it Since SVN is more of a developer tool, Apple has now moved it to be part of their Xcode developer package. Now that you have it installed, you'll notice that the svn command still doesn't work in your terminal. We still need to add the path that it is installed in to a file that your computer looks for applications in so it knows where to look. To edit the file you'll want to type "sudo nano /etc/paths". Read More From the NestMore Postings This-a-way

jcuda.org - Java bindings for CUDA Using expect script in a shell script I wish I could give you some links. I bought the O'Reilly book many years ago and that's how I learned it, and still use the book as reference when I need it. If you are just going to run some regular line commands, here's an example to get you started: Say you have a file with a list of IP address, and want to telnet to each IP address and add a user named user1 and set the user's passwd to "newpassword". You could pass the IP addresses to the script with a loop like the one I used as an example, or use an array, etc.. but say you use a loop like the example above as root, then your expect script would look like: Code: #! Personally, all of my boxes have ssh and keys, so I spawn ssh and have no need to include passwds. As with ksh, csh, perl, etc, there are many ways to accomplish the same task.

A Command Line Primer for Beginners It is a simple fact that probably better than 95% of the system adminning under both Linux and Windows can be done from the command prompt. Fortunately for the safety and security of your system, there are no fancy GUI's with extensive, context sensitive help available for them. ...and those of us who know how a number of them work, won't tell you. You're welcome. For myself, I am a power user. That doesn't mean I use the most obscure methods possible, just for the geek cred, but use whatever gets the job done best, whether command line or GUI... or both. For example, I just wrote a batch file to use wget & Image Magick to download Google Map sections and form them into a single, large image, which I then turn over to Photoshop to finish. My CLI is set to open as soon as I log in, and is the superlative NDN. Flagged

For - Looping commands Conditionally perform a command several times. syntax-FOR-Files FOR %%parameter IN (set) DO command syntax-FOR-Files-Rooted at Path FOR /R [[drive:]path] %%parameter IN (set) DO command syntax-FOR-Folders FOR /D %%parameter IN (folder_set) DO command syntax-FOR-List of numbers FOR /L %%parameter IN (start,step,end) DO command syntax-FOR-File contents FOR /F ["options"] %%parameter IN (filenameset) DO command FOR /F ["options"] %%parameter IN ("Text string to process") DO command syntax-FOR-Command Results FOR /F ["options"] %%parameter IN ('command to process') DO command The operation of the FOR command can be summarised as... Take a set of dataMake a FOR Parameter %%G equal to some part of that dataPerform a command (optionally using the parameter as part of the command).Repeat for each item of data If you are using the FOR command at the command line rather than in a batch program, use just one percent sign: %G instead of %%G. FOR Parameters Examples Nested FOR commands Related:

Shell Programming! A working knowledge of shell scripting is essential to anyone wishing to become reasonably proficient at system administration, even if they do not anticipate ever having to actually write a script. Consider that as a Linux machine boots up, it executes the shell scripts in /etc/rc.d to restore the system configuration and set up services. A detailed understanding of these startup scripts is important for analyzing the behavior of a system, and possibly modifying it. The craft of scripting is not hard to master, since scripts can be built in bite-sized sections and there is only a fairly small set of shell-specific operators and options to learn. In the early days of personal computing, the BASIC language enabled anyone reasonably computer proficient to write programs on an early generation of microcomputers. A shell script is a quick-and-dirty method of prototyping a complex application. What follows is a tutorial on shell scripting.

Tutorial Overview Introduction - General information about JCuda General setup - The basic setup for JCuda Basic test - The setup of a minimum JCuda test project Creating kernels - How to create, compile and run CUDA kernels with JCuda Futher information: A detailed article about GPU Computing Using CUDA, Eclipse, and Java with JCuda has been published by Mark Bishop. Introduction CUDA provides two different APIs: The Runtime API and the Driver API. In the original CUDA Runtime API, kernels are defined and compiled together with C files. Of course, the NVCC can not be used to compile a Java program. The JCuda Runtime API is mainly intended for the interaction with the Java bindings of the the CUDA Runtime libraries, like JCublas and JCufft. General setup In order to use JCuda, you need an installation of the CUDA driver and toolkit, which may be obtained from the NVIDIA CUDA download site. Basic test Creating kernels Writing the kernel function. JCudaVectorAddKernel.cu Compiling the kernel

Shell Scripting Primer: Shell Script Basics Writing a shell script is like riding a bike. You fall off and scrape your knees a lot at first. With a bit more experience, you become comfortable riding them around town, but also quickly discover why most people drive cars for longer trips. Shell scripting is generally considered to be a glue language, ideal for creating small pieces of code that connect other tools together. If you have ever successfully trued a bicycle wheel (or paid someone else to do so), that’s similar to learning the basics of shell scripting. This chapter and the next two chapters introduce the basic concepts of shell scripting. Shell Script Dialects There are many different dialects of shell scripts, each with their own quirks, and some with their own syntax entirely. To that end, the first lesson you must learn before writing a shell script is that there are two fundamentally different sets of shell script syntax: the Bourne shell syntax and the C shell syntax. Bourne-compatible shells And so on. For example:

Related: