This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
odd sed behavior
- To: <cygwin at sourceware dot cygnus dot com>
- Subject: odd sed behavior
- From: "Michael O'Brien" <mobrien at pixar dot com>
- Date: Tue, 21 Mar 2000 17:14:28 -0800
- Cc: "Michael O'Brien" <mobrien at pixar dot com>
- Reply-To: "Michael O'Brien" <mobrien at pixar dot com>
Hola~
When using the 20.1 version of cygwin, I'm seeing the following
strange-ness. From the command prompt:
F:\>sort -u a.msg | sed 's/[\\"]/\\&/g;s/.*/\"&\",/'
sed: -e expression #1, char 21: Unterminated `s' command
The system cannot find the path specified.
F:\>sort -u a.msg | sed 's/[\\"]/\\&/g;s/.*/&,/'
Removing the " from the second s// command to sed, the thing works. I've
tried nearly every way I can think of to escape the " (""", \", \\", '"',
etc). I can't figure out a way that works.
F:\>sort -u a.msg | sed 's/.*/\"&\",/'
Removed the first s// from the sed command, the thing works.
F:\>sort -u a.msg | sed 's/[\\"]/\\&/g'
Removing the second s// command, the thing works.
F:\>sort -u a.msg | sed 's/[\\"]/\\&/g' | sed 's/.*/\"&\",/'
sed: can't read |: No such file or directory
sed: can't read sed: No such file or directory
sed: can't read s/.*/\": No such file or directory
The system cannot find the path specified.
Split the two sed commands up.
Anyone have any ideas why this doesn't work?
MO
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com