About 58 results
Open links in new tab
  1. unix - What does sed -i option do? - Stack Overflow

    Aug 30, 2013 · I'm debugging a shell script and trying to find out the task performed by the following command: sed -i '1,+999d' /home/org_user/data.txt I need to change this command as its failing with …

  2. unix - sed edit file in-place - Stack Overflow

    How do I edit a file in a single sed command? Currently, I have to manually stream the edited content into a new file and then rename the new file to the original file name. I tried sed -i, but my

  3. linux - sed with special characters - Stack Overflow

    The single quotes around the sed body will prevent the shell from substituting any variables, so the $ on the left-hand side is escaped only to prevent its special regular expression meaning.

  4. shell - "sed" command in bash - Stack Overflow

    Oct 21, 2010 · sed is the Stream EDitor. It can do a whole pile of really cool things, but the most common is text replacement. The s,%,$,g part of the command line is the sed command to execute. …

  5. Find and replace with sed in directory and sub directories

    I run this command to find and replace all occurrences of 'apple' with 'orange' in all files in root of my site: find ./ -exec sed -i 's/apple/orange/g' {} \\; But it doesn't go through sub directo...

  6. How to use variables in a command in sed? - Stack Overflow

    How to use variables in a command in sed? Asked 12 years, 4 months ago Modified 2 years, 7 months ago Viewed 202k times

  7. shell - How can I delete all lines that contain a specific string from ...

    Dec 12, 2017 · How would I use sed to delete all lines in a text file that contain a specific string?

  8. 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...

  9. What is the difference between `sed -i -e` and `sed -ie`?

    Apr 24, 2017 · 6 Option -i means that it modify in-place the file you are sed-ing. Otherwise sed just show what modification were done. If you add a suffix after -i (e.g -i.bck) it will backup your input file then …

  10. 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 …