Top "Sed" questions

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

sed -i option is not working on solaris

I am using sed to replace a line with NULL in a file. The command i used is sed -i "…

unix sed solaris
Fastest way to print a single line in a file

I have to fetch one specific line out of a big file (1500000 lines), multiple times in a loop over multiple …

bash sed benchmarking head cat
Regular Expression in sed for multiple replacements in one statement

I want to sanitise some input and replace several characters with acceptable input, e.g. a Danish 'å' with …

regex sed sublimetext2 regex-group
median of column with awk

How can I use AWK to compute the median of a column of numerical data? I can think of a …

bash sed awk median
bash removing part of a file name

I have the following files in the following format: $ ls CombinedReports_LLL-*'('*.csv CombinedReports_LLL-20140211144020(Untitled_1).csv CombinedReports_…

bash shell sed rename mv
Sed on AIX does not recognize -i flag

Does sed -i work on AIX? If not, how can I edit a file "in place" on AIX?

sed aix
Removing trailing / starting newlines with sed, awk, tr, and friends

I would like to remove all of the empty lines from a file, but only when they are at the …

unix sed awk tr
Why is my Bash script adding <feff> to the beginning of files?

I've written a script that cleans up .csv files, removing some bad commas and bad quotes (bad, means they break …

linux bash sed cp
Is there a cleaner way of getting the last N characters of every line?

To simplify the discussion, let N = 3. My current approach to extracting the last three characters of every line in a …

bash command-line awk sed cut
bash method to remove last 4 columns from csv file

Is there a way to use bash to remove the last four columns for some input CSV file? The last …

bash csv sed awk cut