0
votes
1answer
33 views

How can I do a recursive find and replace from the command shell?

Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of '/path/to/folder' with '/other/dir' in all files in this directory ...
1
vote
2answers
400 views

How to search and replace a string in multiple text files (within a directory) with Windows CMD? Part 2

This is in relation to this question . Unfortunately, PowerShell scripts are disabled on the system I am working on. I can't even use a simple (Get-Content). I did figure out how to do change ...
0
votes
2answers
2k views

How to search and replace a string in multiple text files (within a directory) with Windows CMD?

I have multiple text files within a directory, each of which I want to replace every occurrence of the string 1 setlinewidth to 10 setlinewidth. How do I do this via Windows cmd? Please help.
1
vote
1answer
679 views

Search and replace registry entry value using powershell

I'm trying to update a set of registry keys, a set of properties need to be updated with a new value based on the old value. I tried using the following: Get-ItemProperty -Path ...
0
votes
1answer
742 views

Find and Replace text (FART): Replaced 0 occurence(s)

The great FART utility seems to be the norm when trying to replace text on the windows command line. However I can't get it to work as shown in the examples. My test file test.txt: Images Here ...
3
votes
6answers
8k views

Regex Replace from Command line

Is it possible to regex replace from command line? Right now I'm using notepad++ to do this. In command line I can only use FINDSTR wich can only locate the mached files/lines EDIT : Maybe it will be ...
0
votes
2answers
262 views

Using sed to replace a *large* number of variables in a file

I have a large number of log files, on a linux box, I need to cleanse sensitive data from before sending to a third party. I have used the below script on previous occasions to perform this task, and ...
0
votes
1answer
86 views

How to do Linux-like file modifications on Windows command line?

I need to do some more or less easy replacements in certain files on Windows machines. This is part of an automated software build process, so to be able to reproduce it on all build mashines I ...
1
vote
2answers
86 views

Trying to cleanse log files on a Linux machine, currently using sed

I have a large amount of log files that I need to remove sensitive data from. The sensitive data is provided to me in a text file and is prone to change. I had hoped to do the equivalent of this: ...
0
votes
1answer
301 views

Complex (?) Unix Text Replace Command

What's the command line equivalent of: For every file that contains "AAA" within its contents, find "BBB" and replace it with "CCC" Thus, the command would match and replace BBB in a file: ...
1
vote
2answers
1k views

command line find/replace help

I've got a set of 5000+ files that I need to do a simple search and replace in. I have been doing it in a text editor (EditPlus) by opening 500 files at a time, doing a global search/replace, saving ...
2
votes
1answer
1k views

grep + sed for find & replace fun!

I have a dev copy of a website set up that has quite a few hardcoded references to its live counterpart. I would like to replace all occurrences of "www." with "dev." in all files. I think I can use ...
2
votes
4answers
1k views

How do I do a string replace in all PHP files recursively on Linux?

I have a function name that was misspelled, and I want to change it. The function is called in many places of the project. How can I do this with a Linux command on SUSE?