Welcome To Snipplr


Everyone's Recent Bash Snippets Tagged replace



« Prev 1 Next »
Replace a string with another one in many files
0 1069 posted 7 years ago by rm1984
Replaces string 'sth' with 'sth-new' in all files in current directory.
0 623 posted 11 years ago by ef
Find and replace
0 687 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 662 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 639 posted 11 years ago by symsec
0 584 posted 12 years ago by vigoncas
0 675 posted 12 years ago by ragnarokkrr
0 498 posted 13 years ago by Risse
0 848 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 649 posted 13 years ago by bionic
From: http://stackoverflow.com/questions/1169927/using-sed-and-grep-to-search-and-replace
0 618 posted 13 years ago by edeustace
0 693 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 742 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 541 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 525 posted 14 years ago by deepsoul
0 445 posted 14 years ago by AlexLocust
Replace all the occurrences of a string with a replacement in the supplied files.
2 769 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 928 posted 16 years ago by ches
Using this command makes it easy to do a project-wide search-and-replace
0 528 posted 17 years ago by collin
« Prev 1 Next »