delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.7 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Date: | Thu, 20 May 2010 12:39:26 +0000 |
From: | Jurriaan <jurriaan AT rivierenland DOT xs4all DOT nl> |
To: | cygwin AT cygwin DOT com |
Subject: | sed doesn't like LANG= anymore |
Message-ID: | <20100520123926.GA1432@onderneming10.xs4all.nl> |
MIME-Version: | 1.0 |
User-Agent: | Mutt/1.5.17 (2007-11-01) |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
A very long sed script that's been working for ages (back from the 1.5 age) here has stopped working. It turned out sed doesn't like some strings anymore when environment variable LANG is empty. With LANG=ASCII, there are no problems. The actual text in the SED command is shown below as spaces, but it's a Swedish a with a small o on top of it, like this: sed -e"s/@a/ a/g;" where a is character 0xe5. Running with LANG=ASCII works, with LANG empty I get 'unterminated `s' command' from sed (which confused me for a while). This used to work up until a month ago or so with 1.7.x. Kind regards, Jurriaan $ cat handle_kyocera_rapport2.sh #!/bin/sh filename=$1 filenameout=$2 sed -e"s/@å/ å/g;" $filename > $filenameout $ ls > test.org $ echo $LANG ASCII $ ./handle_kyocera_rapport2.sh test.org test.1 $ export LANG= sed: -e expression #1, char 10: unterminated `s' command $ cat test.org handle_kyocera_rapport.sh handle_kyocera_rapport2.sh test.1 test.org $ od -x ./handle_kyocera_rapport2.sh 0000000 2123 622f 6e69 732f 0a68 6966 656c 616e 0000020 656d 243d 0a31 6966 656c 616e 656d 756f 0000040 3d74 3224 730a 6465 2d20 2265 2f73 e540 0000060 202f 2fe5 3b67 2022 6624 6c69 6e65 6d61 0000100 2065 203e 6624 6c69 6e65 6d61 6f65 7475 0000120 000a 0000121 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |