In this article, we will discuss how to use C++ class templates to create an array that can handle any element type. This allows for more flexible and reusable code by using templates to define generic classes.
Programming & Scripting
Bash Scripting: Understanding the Use of Parentheses, Brackets, and Braces
In this tutorial, we will explore the various uses of parentheses, brackets, and braces in BASH scripting. These symbols have distinct functionalities and are crucial for writing effective scripts. Understanding their uses can help you in tasks such as arithmetic operations, test constructs, and parameter expansions.
Using sed and Bash to Fill Empty Cells in a CSV File
Dealing with CSV files containing empty cells can be challenging, especially when trying to process or analyze data programmatically. In this article, we will explore how to use Bash and the powerful text stream editor sed
to fill these empty cells efficiently. This approach ensures that your data is complete and ready for further manipulation or analysis.
How to count number of columns in CSV file using bash shell
Counting the number of columns in a CSV file is a common task that can be easily accomplished using various tools available in the Bash shell. In this article, we will explore five different methods to achieve this. Each method will utilize different command-line tools and techniques, giving you a comprehensive understanding of how to handle CSV files in a Bash environment.
Exit code 127 error status in Bash script
Are you receiving a exit code 127
error when trying to execute a Bash script? This means that your Linux system was not able to find the command referenced inside of the script, which could indicate that the path to the command is not valid, or the command is not installed at all. In this tutorial, we’ll explain what causes this “command not found” error and show you how to fix it.
How to Use a Bash Script to Run Your Python Scripts
Python is a popular programming language used in a wide range of applications, from data analysis and scientific computing to web development and artificial intelligence. Bash is a powerful scripting language used primarily in Unix and Linux environments for automating tasks and running commands. By combining the two languages, developers can create powerful scripts that can automate complex tasks and workflows.
How to embed documentation in Bash scripts
Documenting how an application works, its purpose, and its intended usage is really important, even if it is just a simple shell script we are talking about. To ease code maintenance in the most basic cases, documentation can be embed directly inside scripts. In this tutorial we learn how to include Pearl’s Plain Old Documentation syntax (POD) in bash scripts, and how to convert it to various formats using pod2 utilities such as pod2man and pod2html.
CGI Scripts on Linux: Apache CGI-bin Configuration Examples
The Common Gateway Interface (CGI) is an essential technology that serves as a link between web clients and servers, enabling the execution of scripts and programs on a web server. Although newer technologies have largely replaced CGI, it remains a useful tool for Linux system administrators for quick system monitoring and administrative tasks via web browsers.
How to Install and Switch Java Versions on Ubuntu Linux
Java is a powerful programming language and computing platform first released by Sun Microsystems in 1995. Over the years, it has become indispensable for developing everything from mobile applications to large-scale enterprise systems. Installing Java on Ubuntu, a popular Linux distribution, is a straightforward process that can be accomplished through various methods. This tutorial aims to guide you through the installation of Java on Ubuntu, covering both the installation from the Ubuntu repository and the official Oracle package.
Building a “Hello World” AppImage on Linux
AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application. It allows developers to package desktop applications in a way that they can run on various Linux distributions. This tutorial demonstrates how to build a basic “Hello World” AppImage, providing a straightforward example of how to bundle and distribute software in the Linux ecosystem.
How to create and use custom dmenu scripts
Dmenu is a dynamic menu for X often used on minimal window managers setups. It is part of the suckless tools suite of free and open source utilities created by the suckless.org project, which include, among the others, the dwm window manager and the st terminal emulator.
How to check GPIO status
The GPIO (General Purpose Input/Output) pins of the Raspberry Pi are how the device can interface with external hardware components. It is how things like sensors and actuators plug into the Raspberry Pi, and allow users to control such devices from the Raspberry Pi itself. Something as simple as turning an LED on or off will require setting the pin to which it is plugged in to either true
or false
, which changes the current status of that pin.