Top "Sed" questions

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

sed command with -i option failing on Mac, but works on Linux

I've successfully used the following sed command to search/replace text in Linux: sed -i 's/old_link/new_link/…

linux macos bash sed
Insert a line at specific line number with sed or awk

I have a script file which I need to modify with another script to insert a text at the 8th …

sed awk
Change multiple files

The following command is correctly changing the contents of 2 files. sed -i 's/abc/xyz/g' xaa1 xab1 But what …

sed
Delete all lines beginning with a # from a file

All of the lines with comments in a file begin with #. How can I delete all of the lines (and …

bash sed
Replace whitespace with a comma in a text file in Linux

I need to edit a few text files (an output from sar) and convert them into CSV files. I need …

linux shell csv sed awk
How to insert strings containing slashes with sed?

I have a Visual Studio project, which is developed locally. Code files have to be deployed to a remote server. …

sed
Using sed, Insert a line above or below the pattern?

I need to edit a good number of files, by inserting a line or multiple lines either right below a …

scripting sed awk
Command to get nth line of STDOUT

Is there any bash command that will let you get the nth line of STDOUT? That is to say, something …

bash shell sed stdout
sed one-liner to convert all uppercase to lowercase?

I have a textfile in which some words are printed in ALL CAPS. I want to be able to just …

regex sed
Append file contents to the bottom of existing file in Bash

Possible Duplicate: Shell script to append text to each file? How to append output to the end of text file …

bash sed awk append