Open links in new tab
  1. 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...

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

  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. What does \\1 in sed do? - Stack Overflow

    Jan 6, 2011 · To be precise, in s/foo/bar/, only foo is a regular expression, and the rest is other sed syntax. Basically, bar is just a string, though some things like & and \1 have a special meaning in that …

  5. bash - Append text to file using sed - Stack Overflow

    Mar 9, 2014 · How can I write text to a file using sed? More specifically I would it add null variables to my blank text file that was created using touch. The syntax of sed is very confusing to me.

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

    How to use variables in a command in sed? Asked 12 years, 3 months ago Modified 2 years, 6 months ago Viewed 201k times

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

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

  9. regular expression - Using sed to find and replace complex string ...

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

  10. awk - remove ^M character from file using sed - Stack Overflow

    I have this line inside a file: ULNET-PA,client_sgcib,broker_keplersecurities ,KEPLER I want to get rid of the carriage return character, ^M. I've tried: sed 's/^M//g' However, this removes ^M and