Let's say I want to scan every file in this directory (also recursive).
And I want to replace happy.magic with sad.apps.magic
happy.magic
sad.apps.magic
How can i do this?
find . -type f -exec sed -i 's,happy.magic,sad.apps.magic,g' {} \;
Eric is right, but just to be clear:
find ./ -type f -exec sed -i "s/happy\.magic/sad\.apps\.magic/g" {} \;
Source: https://habr.com/ru/post/1345514/More articles:I want to call it a side effect, but you need to be better for it - dependenciesC # Inheritance: changing a base class variable from a derived class - c #Filter data using EntityDataSource - c #How can I make TextBox controls read-only when they are inside a disabled GroupBox? - c #JQuery error for asmx on Windows 2008 R2 SP1 - asp.netEclipse-> Prefrences-> Network Connections - eclipseThe next available record identifier is ruby-on-railsOrganization / Organization of my classes / interfaces in folders? Without changing the namespace with the folder (Resharper: Namespace) = false) - .netHow can I programmatically subscribe to all events of an object? - reflectionASP.NET MVC 3 Adding Comments to an Article View - asp.net-mvcAll Articles