Summary: | sed i\ does not append newline | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | nsayer <nsayer> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 4.0-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
nsayer
2000-05-10 00:50:00 UTC
The patch above breaks sed -f. Instead, this patch explicitely appends a \n to -e arguments. --- main.c.orig Wed May 10 10:31:02 2000 +++ main.c Wed May 10 10:33:36 2000 @@ -114,6 +114,7 @@ char *argv[]; { int c, fflag; + char *temp_arg; (void) setlocale(LC_ALL, ""); @@ -125,7 +126,10 @@ break; case 'e': eflag = 1; - add_compunit(CU_STRING, optarg); + temp_arg=malloc(strlen(optarg)+2); + strcpy(temp_arg,optarg); + strcat(temp_arg,"\n"); + add_compunit(CU_STRING, temp_arg); break; case 'f': fflag = 1; State Changed From-To: open->closed Committed (src/usr.sbin/sed/main.c, v1.11). |