Recursive Search and Replace in Text Files in Linux

Satish Kumar
Updated on 14-Mar-2023 16:25:11

3K+ Views

One of most basic and frequently performed tasks in any operating system is search and replace. This becomes even more crucial when working with text files, where multiple instances of same word or phrase may be scattered throughout document. In such cases, manually editing each instance can be both time-consuming and error-prone. In this scenario, a tool like Recursive Search and Replace in Linux comes in handy. In Linux, Recursive Search and Replace can be done via various methods. most common one involves use of command-line tools like Sed, Awk, and Perl. These tools are efficient, lightweight, and have been ... Read More

Save Modifications in Place with AWK

Satish Kumar
Updated on 14-Mar-2023 16:24:37

960 Views

Introduction The awk command is a versatile tool used in Unix and Linux environments for text processing and manipulation. One of its key features is ability to modify files in-place, which is particularly useful when working with large datasets. In this article, we will explore how to save modifications in-place with awk, including examples and subheadings to aid understanding. Understanding Awk Before we delve into how to save modifications in-place with awk, it's important to understand what awk is and how it works. Awk is a programming language designed for processing text files, with primary focus on processing rows of ... Read More

CMake Configure Fails to Find Qt5 on Linux

Satish Kumar
Updated on 14-Mar-2023 16:22:42

3K+ Views

Introduction CMake is an open-source cross-platform tool used for building, testing and packaging software. It is widely used in industry for its portability and ability to generate build scripts for various build systems such as make, ninja, etc. Qt is a cross-platform application development framework that is widely used in creating GUI applications. In this article, we will discuss a common issue that developers face while configuring a CMake project on Linux, i.e. "CMake configure fails to find Qt5". Understanding Issue When we configure a CMake project with Qt5, CMake needs to find Qt5 package, which includes required libraries, header ... Read More

Investigate Process Causing Wakeups During Laptop Sleep Mode in macOS or Linux

Satish Kumar
Updated on 14-Mar-2023 16:20:27

2K+ Views

When a laptop goes into sleep mode, operating system tries to conserve power by stopping most processes and putting computer in a low-power state. However, sometimes a process may continue to run or periodically wake up computer, preventing it from entering a deep sleep state. This can lead to increased power consumption and a shorter battery life. In this article, we'll explore how to investigate which process is causing wakeups during laptop sleep-mode in MacOS or Linux. Understanding Power Management Subsystem Before we dive into how to investigate sleep mode wakeups, it's important to understand power management subsystem in your ... Read More

ELF Executable File with Many Zero Bytes

Satish Kumar
Updated on 14-Mar-2023 16:19:33

562 Views

Introduction In world of computer programming, an ELF (Executable and Linkable Format) file is a binary file format used in Unix-based operating systems such as Linux, FreeBSD, and Solaris. These files contain executable code and data, which are used to launch programs and libraries. In some cases, however, ELF files may contain many zero bytes. In this article, we will explore why ELF files may contain many zero bytes, their impact on programs, and how to fix this issue. Why ELF files contain many zero bytes? An ELF file consists of a header followed by sections containing executable code, data, ... Read More

PDF Generation from XHTML in a LAMP Environment

Satish Kumar
Updated on 14-Mar-2023 16:18:27

349 Views

The LAMP environment is widely used for web development, and it is an acronym for Linux, Apache, MySQL, and PHP. This environment is an open-source platform that is easy to use and deploy. PDF format is commonly used for sharing and exchanging documents over internet. However, generating PDF documents can be a challenging task in a LAMP environment, especially when converting XHTML documents. In this article, we will explore different methods used for PDF generation from XHTML in a LAMP environment. What is XHTML? XHTML stands for Extensible Hypertext Markup Language, which is a markup language that is used to ... Read More

PHP and XVFB Usage

Satish Kumar
Updated on 14-Mar-2023 16:14:56

1K+ Views

Introduction Xvfb stands for "X Virtual Frame Buffer" which is used to create a virtual display in memory without any attached physical display device. It allows running graphical applications without any actual graphics hardware. PHP is a server-side scripting language widely used for web development. In this article, we will discuss how we can use Xvfb with PHP to run graphical applications in headless mode. Why do we need Xvfb with PHP? PHP is a server-side scripting language and doesn't provide any direct support for graphics and user interfaces. Most of PHP-based web applications are built on top of popular ... Read More

Run a Qt App in a Different Language

Satish Kumar
Updated on 14-Mar-2023 16:12:25

1K+ Views

Qt is a cross-platform application framework that is widely used for developing applications with graphical user interfaces. It is written in C++ and supports a range of programming languages, including Python, Ruby, and Java. One of most useful features of Qt is its support for internationalization, which allows developers to create applications that can be easily localized for different languages and cultures. In this article, we will discuss how to run a Qt app in a different language. Introduction to Internationalization Internationalization, also known as i18n, is process of designing and developing applications that can be easily localized for different ... Read More

Modeling Projectile Motion Using Python

Dr Pankaj Dumka
Updated on 14-Mar-2023 16:10:15

10K+ Views

Let us first understand some basic concepts and equations based on which the projectile motion can be modelled. The figure shown below explains some basic terminologies of projectile motion. Here, "u" is the velocity with which the projectile is being projected. 𝛼 is the angle of projection of the projectile. The path taken up by the projectile during its flight. Range is the maximum horizontal distance travelled by the projectile. $\mathrm{h_{max}}$ is the maximum height attained by the projectile. Moreover, the time taken up by the projectile to travel the range is called as time of flight. The projectile ... Read More

Eclipse Fails to Start via Application Launcher

Satish Kumar
Updated on 14-Mar-2023 16:09:40

5K+ Views

Eclipse is one of most popular Integrated Development Environment (IDE) used by millions of developers around world. It provides a comprehensive set of tools and features for developing Java applications, web applications, and other software projects. However, like any software, Eclipse may encounter issues and errors that can prevent it from starting up via an application launcher. In this article, we will discuss some common causes of Eclipse startup failure and how to troubleshoot them. Possible Causes of Eclipse Startup Failure Corrupted Installation One of most common reasons why Eclipse fails to start is a corrupted installation. This could be ... Read More

Advertisements