Skip to content
GoLinuxHub
  • Home
  • Linux Basics
  • Security
  • VMware
  • DevOps
  • Programming
  • Contact Me

sed

sed: add or append character at beginning or end of line (row) of a file

You may have some requirement wherein you have to cut a row or get some output from a file and append it to another file as a prefix or suffix. or you know that you

Leave a comment

sed: Ignore whitespace while matching a pattern

In my last articles I had shared the arguments with sed which can be used to perform case insensitive actions (search, replace..) in a file and to delete all blank lines from the file. Now

Leave a comment

sed: perform search and replace only on specific lines (not globally)

By default when we perform search and replace action using sed, that is done globally within a file. Although if you have a line number you can perform the replace based on the line number

2 Comments

sed: delete all blank lines from a text file

Here our requirement is to remove all the blank lines from a file. Our sample file [root@golinuxhub ~]# cat /tmp/file This is line one This is line two This is line three This is line

Leave a comment

sed: case insensitive actions (search replace delete..)

In this article I will show you different ways to perform an action (as per your requirement) ignoring the case of the letters to be searched in a file Below is our sample file #

Leave a comment

10 Basic examples of SED to perform per line action (print/delete)

In this article I will show you various sed expressions which can be used and combined to print or delete specific line from a file IMPORTANT NOTE: My examples provided are only to print the

Leave a comment

sed: remove all leading and ending blank whitespace from a file

Here our requirement is to remove all the whitespace from the leading and ending space per line of a file. Our sample file /tmp/file    This is line one   This is line two  

1 Comment

sed: Insert multiple lines before or after pattern match

In my last articles I had shown you the arguments to be used with sed to add or append any character in the beginning or end of the line and to ignore whitespace while grepping

1 Comment
Post navigation
Older posts
Page1 Page2 Next →

Recent Posts

  • How To Keep Your Business Data Secure In The Cloud 
  • 9 Tips For Safe And Secure Browsing
  • Some of the Most Helpful Tools Every Business Needs
  • How Long Does it Take to Create an Efficient Application?
  • Smart Home Devices Every Individual Must Have
  • What is a VPN and Why You May Need One
  • Mobile Casinos: Then and Now
  • The best screen recorders in 2021. What will be popular in 2022?
  • Benefits of Choosing an Unlimited data Plan
  • Top Most Used and Popular Mobile Apps in 2021
Copyright © 2023 | Hosted On Rocket.net