Topics

Bash String

About this topic: Articles tagged __TAG__

Showing 15 articles

Topics

Articles

Showing 15 articles

How-tos How to Create Multi-Line String in Bash Learn five ways to create multiline text in Bash and write it to a file with a here-document, a variable, printf, and two echo approaches. How-tos How to Remove First Character From String in Bash Learn three ways to remove the first character from a string in Bash, including native parameter expansion, sed, and cut. How-tos How to Split String Into Variables in Bash Split a delimited string into Bash variables with cut, IFS and read, sed, or regular-expression matching. How-tos String Comparison Operator in Bash This article explains the string comparison in Bash using an if statement. How-tos How to Concatenate Strings in Bash Discover how to concatenate strings in Bash easily with our comprehensive guide. Learn various methods, including basic concatenation, using the += operator, and incorporating … How-tos How to Replace Strings in Bash This tutorial demonstrates how to replace one substring with another string in Bash. Learn effective methods using `sed`, `awk`, and Bash parameter expansion to enhance your string … How-tos How to Remove Last Character From a String in Bash Learn how to remove the last character from a string in Bash with easy-to-follow methods. This article covers parameter expansion, sed, awk, and looping techniques, complete with … How-tos How to Get Length of String in Bash This article will explain finding string length using Bash. How-tos How to Extract Substring in Bash This tutorial demonstrates different ways to extract a substring in bash using the cut command, substring expansion and Internal Field Separator. How-tos How to Split String in Bash This tutorial demonstrates splitting a string on a delimeter in bash by using the tr command, the IFS, the read command, using parameter expansion, and using the cut command. How-tos How to Convert Letter Case of Strings in Bash This tutorial demonstrates the conversion of letter case of strings in Bash. How-tos How to Trim Whitespace in Bash This tutorial shows trimming white spaces in bash using the xargs command, the sed command and the awk command. How-tos How to Replace Characters in a String Using Bash This article discusses different approaches to replace characters in a string using Bash. How-tos How to Convert String to Integer in Bash This article presents multiple methods to convert a string into an integer using Bash. How-tos How to Remove Newline From String in Bash This tutorial demonstrates how to remove newline from a string in Bash.

← All topics