Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

sed

sed Match character range

August 10, 2022 by Magenaut

Is there a way to match some Unicode range exactly.
Let’s use the Cyrillic range as an example: U+400 to U+52f

Categories Q&A, Unix & Linux Tags sed, unicode Leave a comment

What does <<< mean?

August 10, 2022 by Magenaut

What does <<< mean? Here is an example: $ sed 's/a/b/g' <<< "aaa" bbb Is it something general that works with more Linux commands? It looks like it’s feeding the sed program with the string aaa, but isn’t << or < usually used for that? Answers: Thank you for visiting the Q&A section on Magenaut. … Read more

Categories Q&A, Unix & Linux Tags bash, command, command-line, sed Leave a comment

sed one-liner to delete everything between a pair of brackets?

August 10, 2022 by Magenaut

I am working with some text that is full of stuff between brackets [] that I don’t want. Since I can delete the brackets myself, I don’t need the one-liner to do that for me, but I do need a one-liner that will remove everything between them.

Categories Q&A, Unix & Linux Tags regular-expression, sed Leave a comment

Only return the matched string in sed

August 10, 2022 by Magenaut

Possible Duplicate:
Extracting a regex matched with ‘sed’ without printing the surrounding characters

Categories Q&A, Unix & Linux Tags sed Leave a comment

sed: delete all occurrences of a string except the first one

August 10, 2022 by Magenaut

I have a logfile with timestamps in it. Occasionally there are multiple timestamps in one line. Now I would like to remove all of the timestamps from a line but keep the first one.

Categories Q&A, Unix & Linux Tags sed Leave a comment

Add prefix and suffix to every line in a .txt file

August 10, 2022 by Magenaut

I am trying to append and prepend text to every line in a .txt file.

Categories Q&A, Unix & Linux Tags awk, sed, text-processing Leave a comment

Remove only the commas present within the double quotes

August 10, 2022 by Magenaut

In a text file, I want to remove , (commas) and also the " (quotes) (only if the double quotes contains numbers separated by commas).

Categories Q&A, Unix & Linux Tags csv, sed, text-processing Leave a comment

Convert all text from uppercase to lowercase and vice versa?

August 10, 2022 by Magenaut

My question is how can I convert all text from uppercase to lowercase and vice versa? That is to change the cases of all the letters. It has to be done with a sed replacement somehow.

Categories Q&A, Unix & Linux Tags sed Leave a comment

How do I replace the last occurrence of a character in a string using sed?

August 10, 2022 by Magenaut

How do I replace only the last occurrence of “-” in a string with a space using sed?

Categories Q&A, Unix & Linux Tags sed, text-processing Leave a comment

Print previous line after a pattern match using sed?

August 10, 2022 by Magenaut

I want to print previous line,every time a match was found. I know about grep -A and -B options. But my Solaris 5.10 machine doesn’t support those options.

Categories Q&A, Unix & Linux Tags sed Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 … Page11 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress