Using sed and Bash to Fill Empty Cells in a CSV File

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.

Read more

How to count number of columns in CSV file using bash shell

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.

Read more

Exit code 127 error status in Bash script

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.

Read more

How to Run Python Scripts with Bash: Tips and Examples

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.

Read more

How to embed documentation in shell scripts using Pearl's Plain Old Documentation syntax

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.

Read more

How to Install and Switch Java Versions on Ubuntu Linux

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.

Read more

Building a "Hello World" AppImage on Linux

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.

Read more

How to Check GPIO Status

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.

Read more