How to search and replace text where line contains some specific string in Linux shell ?
Today we will look how to search some text in a file and replace specific string on the searched line. For this, we will use sed command i.e. Linux Stream...
In this category, you can see all articles related to Unix or Linux operating System.
Today we will look how to search some text in a file and replace specific string on the searched line. For this, we will use sed command i.e. Linux Stream...
Today we will look at the regex to search/grep multiple characters or words from a file or output in linux. First create a file with below contents. [root@nglinux ]# cat...
Today we will look at the usage of dot “.” on Linux bash shell and how to use it in shell scripts to match a pattern. I. Usage of “.”...
Today in this post, we will look how to get length of a variable in linux whether its a string or integer. Getting variable length in Linux 1. Using shell...
We all know that a variable is defined by simply assigning a value to it. However bash shell also provides a feature to unset it, in order to free it...
Today in this post, we will look how to search or grep special characters in a file text. To search special characters in linux, we need to escape them using...
One of the interesting interview question or concept for a directory or file on linux bash shell is “what are the default link count of a file/dir when its created.”...
Today in this post, we will look how to remove empty lines from a file in bash shell linux. This is the easiest way to achieve this task. Removing empty/null...
Here is a quick tip to test a valid IP address on linux bash shell. I have recently used it in one of the scripts i need to prepare. I....
Today lets have a look at a short tip to quickly fill complete disk space of our hard drive in Linux with a single command. It is an interesting and...