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 …

  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" command in bash - Stack Overflow

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

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

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

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

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

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

  8. sed - Change multiple files - Stack Overflow

    The following command is correctly changing the contents of 2 files. sed -i 's/abc/xyz/g' xaa1 xab1 But what I need to do is to change several such files dynamically and I do not know the file na...

  9. What is the proper way to insert tab in sed? - Stack Overflow

    What is the proper way to insert tab in sed? I'm inserting a header line into a stream using sed. I could probably do a replacement of some character afterward to put in tab using regular …

  10. What does \\1 in sed do? - Stack Overflow

    Jan 6, 2011 · @Timo: \1 inserts the contents of the first capture group which is what matches between the first set of parentheses. I don't know whether you're asking in particular about the …