[Bug 6884] New: the sed applet behaves erraticaly when script from file (option -f)

bugzilla at busybox.net bugzilla at busybox.net
Fri Feb 14 16:57:31 UTC 2014


           Summary: the sed applet behaves erraticaly when script from
                    file (option -f)
           Product: Busybox
           Version: 1.22.x
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: clu at free.fr
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0

Created attachment 5240
  --> https://bugs.busybox.net/attachment.cgi?id=5240
tarball of the web extraction used as sample to reproduce the bug

context (used as bash for the shell and sed for the operations) :
BusyBox v1.23.0-TIG-1381-g883817e (2014-01-21 14:06:02 GMT) multi-call binary.

i perform a succession of transformations with bb's sed on a given file (see
attached for a sample).

1. on the command line :
    $ cat samp.htm | sed -r "/sens=achat/! d; s/^[^<]*<//g; s/<tr /\n&/g" | sed
-r "s/.*symbole=([^']*)' title=([^>]*)[^<]*<\/a><\/td>/\"\1\";\2;/g"
  works as expected.

2. and i want to do the same via a sed file :
    $ cat samp.htm | sed -rf f2.sed
where f2. contains the following (without the line numbering):
  1-      /sens=achat/! d
  2-      s/^[^<]*<//g; s/<tr /\n&/g
  3-      s/.*symbole=([^']*)' title=([^>]*)[^<]*<\/a><\/td>/\"\1\";\2;/g
but it seems that the script doesn't go beyond line 2 (as if, for the cli
version, the last pipe was skipped!)

For the story this is a web extraction from boursorama.com (collected with bb's
wget) which 
i'm transforming into csv (with ";" as separator -french version...-)

I am available for further tests on my "win XP pro" platform
thank you for your concern.

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the busybox-cvs mailing list