From owner-freebsd-stable@freebsd.org Wed Jul 27 09:11:09 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2346BA6352 for ; Wed, 27 Jul 2016 09:11:09 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A57D21464 for ; Wed, 27 Jul 2016 09:11:09 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by mail-oi0-x235.google.com with SMTP id l65so8974729oib.1 for ; Wed, 27 Jul 2016 02:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CYNfZqSeYpCigMXWWaUaeuy4RBsTBsPpFKhS6MVS4H0=; b=zhbW9ppEpCtsVZVGoohxzugnJIepW6sh7ssqfko2KU7sn/oLjNoxit5PuVRwNFcAQM wzhlGTU/QewUFxzCvecj1ezCF68DiPGljsBVPFTJxSip23MMeApNPhZm7OyduRFbjUUM mVuJaiOvL+Q6yzOorbhiMGOgTvyLsoTThQ6RlvmNJqlmH7jqjA7qDmWeuwfscKVT3Ohh rDhhkiknjjdgs4MisLfP2evqLe8vWDT1aQkltDGcUMwFdrJCJQTXrp5Ti9sUoFtZH6XW HYqg38ZVDwxplEcFK1iM4p3nJZcWMdqMT6A80f860Bx78+RXT+l8ToEyL6e3FgjzePql YjQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CYNfZqSeYpCigMXWWaUaeuy4RBsTBsPpFKhS6MVS4H0=; b=nDECXFoBFSOvcHcZ4f+8LsL3sTX5JIVmhMuvg7IzJEPkeHXgdKVpCb378kjOJs31HL Qp4NaO0cjQZAvkpejPANc0xfQEMLMzf2Hxu+oDsyTzYykktwV9l/9iFY0Kekcq3RPwAK KVefzUnsJ8VFAUQE9MwPlU6fb6rg0Rqmo2jDw9HCd8FlNaVKA+VVwARp3BjNp4rHBpZR Eyx9qHHovfLk1iTKhx0BFW5b1kUHXFRRCojQQu7cy/tdkmgoJDvYrg7NShmk2nHADuN7 pEprhvDsSJkMAsHbC6mqighdgNV/noAPa8tNPar6woW5MvmG9RLG82siUnR8C8heGmZK nvAQ== X-Gm-Message-State: AEkoouv0Rsv/cqtod1RexpiWiAc8R3fP6T5BD3LS+JhnN+VRlI0Bwtsf+vmFCZnSvqycY9PtZjt8cpJU7BCuqg== X-Received: by 10.202.0.214 with SMTP id 205mr15775419oia.144.1469610668814; Wed, 27 Jul 2016 02:11:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.171.6 with HTTP; Wed, 27 Jul 2016 02:11:08 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?B?Sm9zw6kgR2FyY8OtYSBKdWFuaW5v?= Date: Wed, 27 Jul 2016 11:11:08 +0200 Message-ID: Subject: Re: sed command does not behave equal from 10.3 to 11.0 To: krad Cc: freebsd-stable Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 09:11:10 -0000 On 27 July 2016 at 10:45, krad wrote: > are you sure you aren't hitting a port or something? > > # uname -r ; echo "abc_ABC.def" | sed -e 's/[^A-Z0-9]//g' ; which sed ; md5 > /usr/bin/sed > 10.3-STABLE > ABC > /usr/bin/sed > MD5 (/usr/bin/sed) = 34e6aedf3b42cbd6dd8379342626e0db In 10.3 I get the following: $ freebsd-version -ku $ which sed ; md5 /usr/bin/sed /usr/bin/sed MD5 (/usr/bin/sed) = 858696b78b6d8ed26a1e9835b1bcd89f In 11.0-BETA2 I get: $ freebsd-version -ku $ which sed ; md5 /usr/bin/sed /usr/bin/sed MD5 (/usr/bin/sed) = 229d361061fcf528be12d513ad9a2cf3 I think that the issue is locale or encoding related, as it happens also with gsed, but *not* with LANG=C: $ locale LANG=es_ES.ISO8859-15 LC_CTYPE="es_ES.ISO8859-15" LC_COLLATE="es_ES.ISO8859-15" LC_TIME="es_ES.ISO8859-15" LC_NUMERIC="es_ES.ISO8859-15" LC_MONETARY="es_ES.ISO8859-15" LC_MESSAGES="es_ES.ISO8859-15" LC_ALL= $ echo "abc_ABC.def" | sed -e 's/[^A-Z0-9]//g' bcABCdef ### wrong $ export LANG=C $ locale LANG=C LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= $ echo "abc_ABC.def" | sed -e 's/[^A-Z0-9]//g' ABC ## right