Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
KSH + Sed - String Processing
Name: Hugh Date: December 7, 2003 at 16:27:19 Pacific OS: Linux CPU/Ram: 700Mhz,384Mb
Comment:
I'm writing a script, part of which replaces all occurances of string_A with string_B in a file. Everything works fine until I have to replace a string with '/'s.
I've tried; var=`echo "$src" | sed -e "s/\//\\\//g"`
How can i escape the damn '/'s so I can use it with sed :) Or maybe there's another *IX command that will do the trick for me?
Summary: updatedb is a small program used by slocate clean up its database. If you don't use slocate, you can remove /etc/cron.daily/slocate.cron, and it won't run anymove. gawk is a string-processing tool t...
Summary: Hello, I have a bunch of files named in the manner of 210_slw02_f8.jpg but with different numbers after the 'f'. I want to replace the slw02 in these files with stbdLW02. I have written the followin...
Summary: Dear All, I have a x.html file i want to insert </string> at the end of the line no.21 st and <string> at the start of the line no. 14 th and is it possible ? I tried with sed but it gives error...