Welcome To Snipplr


Everyone's Recent Bash Snippets Tagged replace



« Prev 1 Next »
Replace a string with another one in many files
0 1039 posted 7 years ago by rm1984
Replaces string 'sth' with 'sth-new' in all files in current directory.
0 605 posted 11 years ago by ef
Find and replace
0 663 posted 11 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 648 posted 11 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 627 posted 11 years ago by symsec
0 567 posted 12 years ago by vigoncas
0 646 posted 12 years ago by ragnarokkrr
0 477 posted 12 years ago by Risse
0 832 posted 13 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 628 posted 13 years ago by bionic
From: http://stackoverflow.com/questions/1169927/using-sed-and-grep-to-search-and-replace
0 590 posted 13 years ago by edeustace
0 677 posted 13 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 718 posted 13 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 528 posted 14 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 511 posted 14 years ago by deepsoul
0 432 posted 14 years ago by AlexLocust
Replace all the occurrences of a string with a replacement in the supplied files.
2 744 posted 15 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 905 posted 16 years ago by ches
Using this command makes it easy to do a project-wide search-and-replace
0 519 posted 17 years ago by collin
« Prev 1 Next »