Quote:
Originally Posted by Adam B.
So I tried running this script on my iLiad with the busybox sed. It gave me the output: "sed: bad format in substitution expression"
However, I compiled the GNU version of Sed, ran that on the iLiad, and it did the replacement without a problem. I can distribute the gnu sed with the package, but I'd like to know why busybox doesn't like my sed script. Any ideas?
|
This one is easy: the separator you're using for the first sed command is not recognized by busybox's sed.
Just put the first command like this:
Code:
s:aIDList=:aIDList=FBREADER;:g
That is, using ':' as separator. For the rest of the readers: you can use any character you wish, usually it's chosen so that it minimises the need to escape characters in the regular expression or the substitution string..
Happy sed'ing
P.S.: I'm a big fan of sed -- it's a really useful command (and usually available, unlike awk or even perl

).
P.S.2: Not bad for your first exposure to sed :-o