Objective

Our objective is to make a dummy query execution run faster on PostgreSQL database using only the built in tools available in the database.

Operating System and Software Versions

  • Operating System: Red Hat Enterprise Linux 7.5
  • Software: PostgreSQL server 9.2

Requirements

PostgreSQL server base install up and running. Access to the command line tool psql and ownership of the example database.

Objective

Learn to know the different type of joins and how to use them working with mysql or mariadb databases

Requirements

  • No particular requirements

This tutorial covers advanced python concepts such as Python classes, constructors, encapsulation, inheritance, polymorphism and creating Python packages and modules.

Therefore, if you do not have any prior Python knowledge we refer you to our Python Fundamentals Tutorial.

Objective

The following artcile will provide you with the information on how to check Python version on your operating system.

Difficulty

EASY

Conventions

Objective

Learn the basic concepts of Doctrine ORM, implementing the Data Mapper pattern with php.

Requirements

  • Composer (php package manager)
  • A working lamp setup
  • Understanding the basic object oriented programming and php
  • Understanding the basic database concepts

Objective

This article will provide you with the information on how to check bash version on your operating system.

Operating System and Software Versions

  • Operating System: - Distribution Agnostic

Requirements

No special prerequisites are required is required.

Objective

The objective is to use bash shell to count days since a specific date until now ( today ).

Difficulty

EASY

Conventions

Bash Shell Scripting Definition

Bash
Bash is a command language interpreter. It is widely available on various operating systems and is a default command interpreter on most GNU/Linux systems. The name is an acronym for the ‘Bourne-Again SHell’.
Shell
Shell is a macro processor which allows for an interactive or non-interactive command execution.
Scripting
Scripting allows for an automatic commands execution that would otherwise be executed interactively one-by-one.

Bash Shell Script Basics

Do not despair if you have not understood any of the above Bash Shell Scripting definitions. It is perfectly normal, in fact, this is precisely why you are reading this Bash Scripting tutorial.

In case you did not know, Bash Scripting is a must skill for any Linux system administration job even though it may not be implicitly requested by the employer.

What is Shell

Most likely, your are at the moment sitting in front of your computer, have a terminal window opened and wondering: "What should I do with this thing?"

Well, the terminal window in front of you contains shell, and shell allows you by use of commands to interact with your computer, hence retrieve or store data, process information and various other simple or even extremely complex tasks.

Objective

Understanding the base concepts behind udev, and learn how to write simple rules

Requirements

  • Root permissions

Difficulty

MEDIUM

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Introduction

In a GNU/Linux system, while devices low level support is handled at the kernel level, the management of events related to them is managed in userspace by udev, and more precisely by the udevd daemon. Learning how to write rules to be applied on the occurring of those events can be really useful to modify the behavior of the system and adapt it to our needs.

Objective

Learn to use the argparse module to easily parse python scripts parameters

Requirements

  • Basic knowledge of python and object oriented concepts

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Introduction

In a previous article we have seen how to parse command line arguments using getopts in the context of bash scripts (you can find the article here). Now we will see how to accomplish the same task, in a more powerful way, when writing a python script.

Objective

Play audio with VLC in Python.

Distributions

This will work on any Linux distribution

Requirements

A working Linux install with Python and VLC.

Difficulty

Easy

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Introduction

There are plenty of ways to play audio files with Python. It really depends on your application, but the easiest way, by far, is to use the bindings for VLC to control VLC with Python, and play your files.

With VLC, you don't need to worry about codecs and file support. It also doesn't require too many complicated methods, and/or objects. So, for simple audio playback, VLC is best.

Objective

Consume a JSON API in Python.

Distributions

This will work on any Linux distribution.

Requirements

A working Linux install with Python.

Difficulty

Easy

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Introduction

One of the main reasons that you'd like to work with JSON in Python is consuming APIs. There are hundreds of excellent public APIs out there and ready to use in your application. Even huge players on the web, like Facebook and Twitter, out out APIs for you to work with.

You can build entire applications around API data, including building web applications that aggregate, manipulate, and display that data in a convenient way.

JSON is a favorite among developers for serializing data. It's used in most public APIs on the web, and it's a great way to pass data between programs. It is possible to parse JSON directly from a Linux command, however, Python has also no problem reading JSON.

The objective of this article is to describe how to parse JSON data in Python.

Objective

Encode Python data into JSON.

Distributions

This will work on any distribution with Python installed.

Requirements

A working Linux install with Python

Difficulty

Easy

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Introduction

JSON is the universal format for passing data between programs and/or languages, especially on the web. Python has excellent built-in support for converting data from a Python program into JSON for another program to use.

Objective

The objective of this tutorial is to describe how to use the bash shell trap builtin to make our scripts able to perform certain actions when they receive a signal or in other specific situations.

Requirements

  • No special requirements

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Introduction

bash scriptingWhen writing scripts that are meant to run for a considerable time, it's very important to increase their robustness by making them able to react to system signals, executing specific actions when some of them are received. We can accomplish this task by using the bash trap builtin.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: