Commit f707f5b9 authored by Christophe Trefois's avatar Christophe Trefois
Browse files

Bash part

parent 0046d2d0
...@@ -303,6 +303,39 @@ nano thisfile.txt ...@@ -303,6 +303,39 @@ nano thisfile.txt
## Scripts - Running and Writing your own ## Scripts - Running and Writing your own
*** ***
Sometimes when you download and extract a zip file, it will contain not only files to look at, but also programs or scripts that you want to run.
Have a look at the contents extracted earlier and you will notice a file called ``
* Run the program using `./`
> This is a special syntax which tells the terminal to execute a program named `` in the current folder rather than in the normal folders where all commands are. On Windows "Program Files" and *nix /usr/bin, /usr/sbin/ etc...
* Run the program again using `./ YourName`
* Look at the contents of the program using `nano`
## Create your first bash script!
* Create a new file called ``
> You can use touch and then nano, or you can use nano directly.
* Type in the following two lines
echo "Hello World"
* Save and exit.
* Run the program using `./`
* ERROR. Why? We need to tell linux that a given file can be executed and therefore have to give the correct permissions to that file to transform it into a program that can be launched.
* To make our script executable do `chmod u+x`
* Launch our first script again
* Simple `bash` scripting [Tutotial]( * Simple `bash` scripting [Tutotial](
## Basic git (source control) ## Basic git (source control)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment