Welcome To Snipplr


Everyone's Recent Bash Snippets Tagged replace



« Prev 1 Next »
Replace a string with another one in many files
0 124 posted 3 years ago by rm1984
Replaces string 'sth' with 'sth-new' in all files in current directory.
0 43 posted 7 years ago by ef
Find and replace
0 58 posted 7 years ago by inreflection7
As portrayed by the example found in the [Advanced Bash Scripting guide](http://tldp.org/LDP/abs/html/here-docs.html) this demonstrates a few techniques
0 60 posted 7 years ago by symsec
As portrayed by the example found in the [Advanced Bash Scripting guide](http://tldp.org/LDP/abs/html/here-docs.html) this demonstrates a few techniques
0 52 posted 7 years ago by symsec
0 65 posted 8 years ago by ragnarokkrr
0 36 posted 9 years ago by Risse
0 129 posted 9 years ago by lamebollock
From the referenced website: Well, that command speaks for itself "sed" edits "-i in place ( on the spot ) and replaces the word "ugly with "beautiful" in the file "/home/bruno/old-friends/sue.txt"
0 60 posted 9 years ago by bionic
From: http://stackoverflow.com/questions/1169927/using-sed-and-grep-to-search-and-replace
0 59 posted 9 years ago by edeustace
0 63 posted 9 years ago by moonbather
This command line aims at moving directories from a target location to the present working directory (pwd), backing the pwd directories up as it encounters them. The script works by: 1. Iterating through the contents of the target directory (us...
0 84 posted 10 years ago by karlhorky
This snippet shows how to replace the colours in a monochrome image, i.e. one which only contains two colours and the range of hues between them.
0 38 posted 10 years ago by deepsoul
When you put an image in a printable document, you don't want it to have black (or coloured) background. ImageMagick allows to replace colours even when the coloured regions are non-contiguous. Arbitrary colour values can be specified with `\#12345...
0 33 posted 10 years ago by deepsoul
0 27 posted 10 years ago by AlexLocust
Replace all the occurrences of a string with a replacement in the supplied files.
2 61 posted 11 years ago by sanjivarunsahayamhotmailcom
\Q...\E perl quoting means no ugly escaping in the regex. find's -print0 with xargs -0 is the secret to handling files with spaces in their names.
1 77 posted 12 years ago by ches
Using this command makes it easy to do a project-wide search-and-replace
0 70 posted 13 years ago by collin
« Prev 1 Next »