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. regular expression - Using sed to find and replace complex string ...

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

  3. What is sed and what is it used for? - Ask Ubuntu

    From Sed man page: Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). While in some ways similar to an …

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

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

    Oct 21, 2010 · 54 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. …

  6. What is the purpose of -e in sed command? - Unix & Linux Stack …

    Jun 3, 2015 · In your example sed 's/foo/bar/' and sed -e 's/foo/bar/' are equivalent. In both cases s/foo/bar/ is the script that is executed by sed. The second option is more explicit, but that is probably …

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

  8. sed with multiple expression for in-place argument

    Jun 2, 2020 · I am trying to replace multiple words in a file by using sed -i #expression1 #expression2 file Something 123 item1 Something 456 item2 Something 768 item3 Something 353 item4 Output …

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

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

  10. Using 'sed' to find and replace - Unix & Linux Stack Exchange

    Oct 5, 2014 · sed is the s tream ed itor, in that you can use | (pipe) to send standard streams (STDIN and STDOUT specifically) through sed and alter them programmatically on the fly, making it a handy …