About 2,390,000 results
Open links in new tab
  1. regular expression - Using sed to find and replace complex string ...

    Learn how to use sed with regex for complex string replacements in Unix systems.

  2. How to use back-reference of sed replacement command correctly ...

    But I just want to execute sed on numbers which begins with (555) and add it to the output through back reference. Could you tell me how to write this special command correctly?

  3. What actually the meaning of "-n" in sed? - Stack Overflow

    Sed has two places to store text: pattern space and hold space. Pattern space is where each line is put to be processed by sed commands; hold space is an auxiliary place to put some text you may want …

  4. Regex alternation/or operator (foo|bar) in GNU or BSD Sed

    sed -i is non-standard, and where supported doesn't work the same in all implementations at all. Two implemented (GNU and FreeBSD) implemented that perl-style option independently and differently in …

  5. Understanding Sed command with extended RegExp

    Jul 31, 2018 · 7 I don't know what you know about sed. In sed (1) you may find: sed - stream editor for filtering and transforming text and: -E, -r, --regexp-extended use extended regular expressions in the …

  6. sed - How to remove all special characters in Linux text - Stack Overflow

    Mar 30, 2017 · 23 How to remove the special characters shown as blue color in the picture 1 like: ^M, ^A, ^@, ^ [. In my understanding, ^M is a windows newline character, I can use sed -i '/^M//g' to …

  7. sed: how to disable autoprinting via script file instead of using the ...

    Jan 26, 2017 · Are you planning to use the file with sed -f from the command line, or using #!/usr/bin/sed -f at the top of the file? Either way, replacing the -f with -nf should work.

  8. sed - How to insert text before the first line of a file? - Unix ...

    Use sed 's insert (i) option which will insert the text in the preceding line. sed '1 i\ Question author's update: To make it edit the file in place - with GNU sed - I had to add the -i option: sed -i '1 i\anything' …

  9. bash - Using sed to mass rename files - Stack Overflow

    Mar 3, 2010 · rename 0000 000 F0000* That's a lot more understandable than the equivalent sed command. But as for understanding the sed command, the sed manpage is helpful. If you run man …

  10. Using different delimiters in sed commands and range addresses

    I am using sed in a shell script to edit filesystem path names. Suppose I want to replace /foo/bar with /baz/qux However, sed's s/// command uses the forward slash / as the delimiter. If I do tha...