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

SED Usage and Examples (Cheatsheet)


10 Basic examples of SED to perform per line action (print/delete)
sed: remove all leading and ending blank whitespace from a file
sed :Replace whole line when match found
sed: Replace string based on line number (certain line)
sed: Insert multiple lines before or after pattern match
sed: match string and append new line (before or after)
sed: Insert character in the beginning or end of line with matched pattern
sed: insert word after match in middle of the line
sed: case insensitive actions (search replace delete..)
sed: delete all blank lines from a text file
sed: perform search and replace only on specific lines (not globally)
sed: add or append character at beginning or end of line (row) of a file
sed: Ignore whitespace while matching a pattern

Recent Posts

  • Everything You Need to Know About Vulnerability Management
  • How Does IT Enhance the Experience of Online Gambling?
  • What Is A Route API?
  • Transforming Your Exhibition Space with Shell Scheme Graphics
  • Mastering Power BI Implementation: A Step-by-Step Guide
  • Harnessing New Technologies to Elevate Human Health
  • Cross-Platform Development: Harnessing the Power of Kink 0.6.5 to Craft Applications Compatible with Linux and Beyond
  • Data Backup Failure: 9 Reasons & Solutions 
  • Online Blackjack: The Game That Will Make You A Fortune
  • 6 Best Practices For A Successful Cloud Backup
Copyright © 2025 | Hosted On Rocket.net