JIYIK CN >

Current Location:Home > Learning >

All

Get the length of a string in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

Get the length of a string in Bash

In programming languages, the length or size of a data type plays an important role. It helps in list traversal and facilitates the extraction of useful information. The length is especially important when performing tasks that require trav...

Full

Convert a string to an integer in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

This article will discuss string to integer conversion in Bash script. First, we will discuss the math operations on strings and then we will see how to convert a string to an integer. Mathematical operations on strings Let's start our disc...

Full

String comparison operators in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

In this article, we will explain string comparison in Bash using if statement. The shell program that runs in Linux and provides a command line interface for users to execute different commands is called Bash shell. It is also used as the d...

Full

Replace characters in a string using Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

A common operation involving string literals is replacing individual characters or substrings within the string with other characters or substrings. In this article, we will look at several ways to do string replacement using the BASH shell...

Full

Returning an array in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

Since Bash does not handle arrays, returning an array can be a bit difficult. However, it is possible to overcome this limitation by returning an array from a function using a global variable or a command substitution workaround. This artic...

Full

Get File Creation Date/Time in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

This article will explain how to get file creation date/time in Bash. We will start our discussion with a brief introduction to file creation in the old system. Later we will learn about creating files in Bash. Finally, we will discuss diff...

Full

Pattern matching in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

Pattern matching is a powerful feature in Bash that allows you to compare a string to a pattern to find a match or perform an action based on the result of the comparison. This is useful in situations such as checking the format of a string...

Full

Remove the first character from a string in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

Removing the first character of a string can be tricky in Bash because there is no built-in function that can do this directly. However, there are several ways to achieve this, such as using the sed command, the cut command, or substring pa...

Full

Bash remove newline from string

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

This article explains how to remove newlines from a string in Bash. Creating a string with newlines in Bash Sometimes, it is required that a string does not have newline characters in it. Bash provides several methods to remove newline char...

Full

Splitting a string into variables in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

This article will discuss different ways to split a string into variables in Bash. We will start our discussion with a brief introduction to strings. Later, we will discuss various ways to split a string using Bash examples. Strings in Bash...

Full

Passing an array to a function in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

This article is all about using functions in Bash scripts and passing arrays to them. Before getting into the actual topic, we will give a brief introduction to Bash scripting. A Bash script file contains a series of Bash commands. These co...

Full

Multidimensional arrays in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

Multidimensional array is a very important element for any program. It is mainly used to create table view of data and many other purposes. This article demonstrates how to create a two-dimensional array. In addition, we will discuss the to...

Full

Sorting Arrays in Bash

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

Sorting an array is a very common task in any programming language. In Bash scripting, we can also accomplish this task in two different ways. The first one uses any sorting algorithm and the second one uses a built-in keyword in Bash scrip...

Full

Bash md5sum command

Publish Date:2025/03/23 Author:JIYIK Category:OPERATING SYSTEM

This article explains how to use the md5sum command in Bash. Bash md5sum command md5sum command prints the 32 character and 128 bit checksum of a given file. This command converts the file into a hash using the MD5 algorithm; the syntax of...

Full

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Hottest

Tags

Scan the Code
Easier Access Tutorial