fbpx
Increment a variable in Bash

Increment a variable in Bash

Suppose you have a variable below how would you increment that variable by 1 in Bash x=0 You can use let x++ If we want to loop through a number of items while incrementing the x variable, we can use the for loop below: for name in Lisa Lilly Lousa ; do echo $x $name...
Convert cURL syntax to Python

Convert cURL syntax to Python

cURL is very useful for performing network requests. An example of a GET request to fetch a post from jsonplaceholder¬†¬†is below curl https://jsonplaceholder.typicode.com/posts/1 The result of the cURL request is as follows { “userId”: 1, “id”:...
How to Install Python 3 on Centos 7

How to Install Python 3 on Centos 7

Centos 7 by default comes with Python 2. You can confirm this by typing the following command python –version The screenshot above shows Python 2.7.5 To install Python 3, first, add the Inline with Upstream Stable repository by running sudo yum install -y...