Re: Batch replace strings in all files in a folder--when there are UNIX-style slashes
Escape the directory separator with a back slash.
Edited to add:
Like t4thfavor, my first thought was to use sed (stream editor) to do this. It has the -i option to do in-place editing. For this purpose, sed is no more complicated than using perl. Here's something to get you started with sed. This should be what comes after xargs.
sed -i 's/home\/tarahmarie/data/g'
I tested the above command and it works with a file argument -- should also work fine with xargs.
Last edited by StephenDavison; December 13th, 2010 at 05:57 AM.
Reason: added code tag and tested the command
MSI Wind U100-432US (Synaptics touchpad, Intel Wifi Link 1000, Bison webcam rev.03), Ubuntu 10.10
System76 Ratel Ultra (Core i5-650, 4GB DDR3, 1.5 TB HDD)