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

Recommended for you

How to use variables in a command in sed? Asked 12 years, 2 months ago modified 2 years, 4 months ago viewed 201k times For this sort of task, i normally use a small bash script with sed to re-write the file. How do i get sed to replace just the first occurrence of a string in a file rather than replacing every Ò€¦ 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. Sed 's/^m//g' however, this removes ^m and

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. Sed 's/^m//g' however, this removes ^m and

You may also like