View Single Post
Old 07-19-2007, 10:18 AM   #3
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by Adam B. View Post
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
Antartica is offline   Reply With Quote