Tag: Tutorial
-
Conditionals
Bash Conditionals In the last section, we covered some of the most popular conditional expressions. We can now use them with standard conditional statements like if, if-else and switch case statements. If statement The format of an if statement in Bash is as follows: if [[ some_test ]] then <commands> fi Here is a quick…
-
Variables
Bash Variables As in any other programming language, you can use variables in Bash Scripting as well. However, there are no data types, and a variable in Bash can contain numbers as well as characters. To assign a value to a variable, all you need to do is use the = sign: name=”DevDojo” {notice} as…
-
Hello
Bash Hello World Once we have our devdojo.sh file created and we’ve specified the bash shebang on the very first line, we are ready to create our first Hello World bash script. To do that, open the devdojo.sh file again and add the following after the #!/bin/bash line: #!/bin/bash echo “Hello World!” Save the file…
-
Creating
Creating a Bash Script Let’s start by creating a new file with a .sh extension. As an example, we could create a file called devdojo.sh. To create that file, you can use the touch command: touch devdojo.sh Or you can use your text editor instead: nano devdojo.sh In order to execute/run a bash script file…
-
Intro
Introduction to Bash In this bash crash course, you will learn the Bash basics so you could start writing your own Bash scripts and automate your daily tasks. Bash is a Unix shell and command language. It is widely available on various operating systems, and it is also the default command interpreter on most Linux…
-
JSX
Writing markup with JSX The markup syntax you’ve seen above is called JSX. It is optional, but most React projects use JSX for its convenience. All of the tools we recommend for local development support JSX out of the box. JSX is stricter than HTML. You have to close tags like <br />. Your component…
-
Components
React apps are made out of components. A component is a piece of the UI (user interface) that has its own logic and appearance. A component can be as small as a button, or as large as an entire page. React components are JavaScript functions that return markup: Now that you’ve declared MyButton, you can…