bash functions and variables

Bash allows you to use variables inside functions. By default bash's functions have the variables as a script: $1 first argument, $2  the second argument etc until number 9 $@ an array of all the  arguments to the function $# the number of all arguments So let say we want to create a function that calculates … Continue reading bash functions and variables

Advertisements

Bash math calculation 1

There are a few ways to do math calculations in bash. The first option is to use the Linux command expr. we can use this command to do the simple math calculation like addition, subtraction, multiplication, and division. we use the following signs, + for addition, - for subtraction, \* for multiplication, / for division. We … Continue reading Bash math calculation 1

Docker getting started – part 2

If we want to install docker on different Linux distributions, then the best way is to check the instruction on the docker website: https://docs.docker.com/engine/installation/ It has specific instructions for the different distributions. After installing docker, we should check the docker version by running: docker -v And we will see the docker version and the build … Continue reading Docker getting started – part 2

Docker getting started – part 1

Docker is a software that allow us to do operating system visualization. It uses the  Linux kernel to isolate process  from their host machine and other process. The docker itself is written with Go. You can install docker on windows and Macintosh, but it in order to work on those system, it will install a linux VM. … Continue reading Docker getting started – part 1

Linux type command – knowing what will be executed

In Linux, you can check what will run when you execute command. The first information you need is the type of the command, if it is a built-in shell, alias, or an executable file. The type command gives that information: type <command> And it will tell you the command type: In the example below, we run type … Continue reading Linux type command – knowing what will be executed

Yarn js Package Manager – part 1

Yarn is a package manager for java Script. It is alternative to npm and bower. It is backward compatible to npm. Yarn has a great cache mechanism, so if dependency is requested more than once, after the first time, it will use cache and wont try to fetch information from the internet. Yarn installation process is … Continue reading Yarn js Package Manager – part 1

MongoDB tutorial – part 1

Mongo DB is document based data based. Document is just self-contained chunk of information. We can  group many documents into collection and many collections into DB. So in Mongo database is a set of collection, and a collection is a set of documents. One great advantage of document database is mapping of the program objects into … Continue reading MongoDB tutorial – part 1