Bug 100 - sh doesn't handle escapes properly
Summary: sh doesn't handle escapes properly
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-01-08 15:20 UTC by Paul Richards
Modified: 2001-11-28 02:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Richards 1995-01-08 15:20:01 UTC
sh doesn't deal correctly with escaped backslashes. The following snippet
should put an escape before each end of line but the sh is botching it
before it gets to sed.

How-To-Repeat: 
# `sed -e 's/$/ \\\\/g' $change_msg`
sed: 1: "s/$/ \/g": unterminated substitute in regular expression

It should pass s/$/ \\/g to sed but it doesn't.
Comment 1 Paul Richards freebsd_committer 1995-01-09 20:32:29 UTC
State Changed
From-To: open->closed

A fix has been applied.