The Baeldung logo
  • The Baeldung LogoLinux Sublogo
  • Start Here
  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • About Baeldung

      About Baeldung.

Scripting » sed

Scripting allows us to programmatically interact with the Linux operating system. Learn about some basic scripting fundamentals as well as some advanced topics focused on Bash.

  • bash (144)
  • awk (82)
  • x sed (57)
  • grep (37)
  • echo (37)
  • Shell (33)
  • printf (20)
  • perl (19)
  • date (17)
  • tr (15)
  • read (15)
  • Python (14)
  • find (13)
  • regex (12)
  • cat (12)
  • ls (11)
  • cut (11)
  • xargs (11)
  • set (10)
  • export (9)
  • source (8)
  • alias (8)
  • expr (7)
  • tail (7)
  • script (7)
  • curl (7)
  • tee (7)
  • copy-edit (7)
  • vim (6)
  • ping (6)
  • env (6)
  • vi (5)
  • let (5)
  • IFS (5)
  • JSON (5)
  • eval (5)
  • cd (5)
  • tar (5)
  • sort (5)
  • cron (5)
  • watch (5)
  • expect (5)
  • ssh (5)
  • make (4)
  • cp (4)
  • jq (4)
  • pushd (4)
  • rsync (4)
  • nohup (4)
  • time (4)
  • wait (4)
  • sudo (4)
  • base64 (3)
  • git (3)
  • ip (3)
  • csv (3)
  • mysql (3)
  • pdf (3)
  • ImageMagick (3)
  • Docker (3)
  • ps (3)
  • chmod (3)
  • pgrep (3)
  • readlink (3)
  • exit (3)
  • reference (3)
  • wget (3)
  • paste (3)

>> How to Remove All Lines That Don’t Match

>> How to Split a String on Multiple Delimiters in Shell

>> How to Check if a String Contains an Uppercase Letter in Bash

>> How to Convert Files and Strings to Lowercase or Uppercase

>> Finding Lines With Exactly One Instance of a Specific Character in a File

>> How to Extract a Complete URL From a String in Shell

>> How to Increment a Number in a Matched Pattern

>> Assigning the Current Git Branch Name to a Variable in a Shell Script

>> How to Loop Over Each Character in a Bash String

>> Converting UTF-8 to ASCII

>> How to Export Variables From a File

>> How to Extract the First Word of a String in Bash

>> Wrap Quotes Around Each Line in a File or Variable

>> How to Run Variable Content as a Command in Bash

>> Generating a List of Dates in a Range in Bash

>> How to Extract the Last n Characters of a String in Bash

>> Alternatives to the sed Command in Linux

>> How to Store Standard Error Messages in a Linux Variable

>> How to Replace Text After a Specific Word Using sed

>> Bash One-Liners to Remove Characters From a Variable

>> How to Toggle Comments in a File From the CLI

>> How to Repeat Each Line in a File Multiple Times in the Command Line

>> The Backslash and Removing Backslashes From a Text File or String

>> How to Output Comma-Separated Strings Using Bash Brace Expansion

>> Adding Field to a JSON Object

>> How to Match a String with a Fixed Numbers of Characters in Linux

>> How to Replace a Character in a Matched Line In-Place

>> How to Remove Lines That Contain Fewer Than n Characters

>> How to Delete Text Before a Delimiter From the Command Line

>> How to Embed a Shell Command Into a sed Expression

>> sed Print to Standard Output When Editing In-place

>> Guide to Converting Timestamps in a Column to a Date

>> How to Convert a Date Format to Another Format

>> Zero Padding in the Shell

>> Extract Text Between Two Specific Characters in the Command Line

>> Print the Count of Lines Together With a Command’s Output

>> How to Prepend a Timestamp to the Output of a Command in Linux

>> How to Trim Whitespace From a Bash Variable

>> How to Read Log Files Between Two Dates

>> Replacing Specific Line With a String Variable in Shell

>> How to Process a Bash Variable With sed

>> Inserting a Newline in a Variable in Bash

>> Replacing Whitespaces With Tabs in a File in Linux

>> Return Value of Substitutions With sed and awk

>> Removing the Last Character of a File

>> How to Add Up a Column of Numbers in Bash

>> File Editing: Appending a Non-Existent Line to a File

>> Using sed With a Literal String Instead of an Input File

>> Check if a String Contains a Substring in Linux

>> Splitting a File at Given Line Numbers

>> Difference Between grep, sed, and awk

>> Using sed to Replace a Multi-Line String

>> Read Random Line From a File in Linux

>> How to Reverse the Order of Lines in a File in Linux

>> Remove the First Characters of a Line

>> How to Join Multiple Lines Into One

>> Guide to the sed Stream Editor

  • ↑ Back to Top
The Baeldung logo

Categories

  • Administration
  • Files
  • Filesystems
  • Installation
  • Networking
  • Processes
  • Scripting
  • Search
  • Security
  • Web

Series

  • Linux Administration
  • Linux Files
  • Linux Processes

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo