Top "Sed" questions

Sed (Stream EDitor) is a command line editor for POSIX environment.

PCRE Regex to SED

I am trying to take PCRE regex and use it in SED, but I'm running into some issues. Please note …

regex sed pcre
Eliminate partially duplicate lines by column and keep the last one

I have a file that looks like this: 2011-03-21 name001 line1 2011-03-21 name002 line2 2011-03-21 name003 line3 2011…

bash awk sed text-processing
Why doesn't `\d` work in regular expressions in sed?

I am trying to use \d in regex in sed but it doesn't work: sed -re 's/\d+//g' But …

regex linux awk sed
How to remove non-ascii chars using sed

I want to remove non-ascii chars from some file. I have already tried these many regexs. sed -e 's/[\d00…

regex linux unix sed non-ascii-characters
using awk to extract and split

i am trying to extract a substring with awk from a command answer in bash example output line: abc_def_…

string bash sed awk strip
tcpdump: Output only source and destination addresses

Problem description: I want to print only the source and destination address from a tcpdump[1]. Have one working solution, but …

bash sed awk tcpdump
Do a tail -F until matching a pattern

I want to do a tail -F on a file until matching a pattern. I found a way using awk, …

shell sed awk tcl tail
sed - Get only the replaced string from a multiline input & omit unmatched lines!

I want sed to omit all non-matching lines, and only output the replaced string (of the single/multiple intended line/…

regex sed replace multiline
Insert multiple lines of text before specific line using Bash

I am trying to insert a few lines of text before a specific line, but keep getting sed errors when …

bash unix sed text-manipulation
What GNU/Linux command-line tool would I use for performing a search and replace on a file?

What GNU/Linux command-line tool would I use for performing a search and replace on a file? Can the search …

regex linux sed gnu