bulk search and replace with sed
July 26, 2010 | In Linux | No CommentsKurt writes:
I’ve got a text input string in unix that I want to parse and replace all of the following characters [\^$.|?*+(){} with the same character preceded by an \.
(I am trying to backslash escape all the special characters used by grep before I feed the string into grep. Don't ask - not my original code.)
For example, "this \is an $xample" would become "this \\is an \$xample".
What would be the easiest way to do this?
I got this to work : sed -e "s/\([[\^$.|?*+(){}]\)/\\\\\1/g” test.txt
hope this helps someone.
Ubuntu on PowerPC Mac Mini
May 17, 2010 | In Other Tech | No CommentsOld Mac Mini ppc builds for Ubuntu
http://cdimage.ubuntu.com/ports/releases/10.04/release/
Thread ” Where to download Ubuntu for PowerPC and other frequently asked questions”
Dell Inspiron Mini 10 SSD Swap
March 24, 2010 | In Linux, Other Tech | No CommentsYoutube has lots of howto’s to show how to crack these various mini’s .
Dell Inspiron Mini 9 Upgrade Flash Hard Drive
Every little machine has its own little trick to opening the case….
dell mini replace hard drive how
Powered by WordPress
RSS Feed - Syndicate this Site
and comments feed



