delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/07/22/15:51:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=iFE
DKajiq4JSwHb0eEGs5E1fjt/XLPGEimwTf6ZyswiQURQRjVwJCMhdL9DcLXUAXYU
+Ui4yyfV1LDlevnLznOtytC+js7P3dfv1Ncv3GrOoDtEwhH3r8zVYOtPIil2IA+I
Qf4mO3ycNfaGwzWac4AQdvRUiGFGN2opJYX78L68=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=6c6Zwgs0T
e1kW6Paph9Jxv7pD1k=; b=HhjYcvbRAMEQTB1/yQ0qFlwd5JQH9iaNCMh3F6+ZO
vO4Uq56/i3WMU1gm3+lSSrWmgVrLWd1o0ZOSisfOSznQTcv7xan0qu2vUGrJfTE+
BDHFUGyo+JZEtEQAUewV0wlcAdCOu8Of+OkifMO1+pLVpe7Qn9d1x2Oa/k+Mt9uP
nQ=
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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*UA:16.0, H*x:16.0, HX-Languages-Length:664, H*UA:Outlook
X-HELO: resqmta-po-12v.sys.comcast.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1563825051; bh=/K0ZAI7yfI1Qur5vTT/DVrJJ+9kgCcrFhAFTRHEHIO8=; h=Received:Received:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; b=KSUhup4ksnuw7TTrw5MFmsuB/3gXkFC4Icwy2kLPpq7sGxspeXWqDS9w/ioPk+07A ML1sjCPS6147fmWATooO4/oU0pl8Yn/q8zf+nOLb16IhylCJpjnBx0rmXqdmhCeEVT 9viJiiQr8sYkxub6FBAYUvWiEqPWhTDR3BxSxhEjX8h0KDG8FOVZgEuYHxd6aQSSng QwwQPseRhyllF6Ef5tdGeMsUjkiSDr+Scym3AF6ZY3otiy/1qNAoXHYSM38uBmU3yM fUYsg/+HMq5xxsgaiI2j/81N0XxbF15PHDc+6+5arNjEzLxv0PU21XXufIrA9m1qNS 4xVQ39FX/8BWg==
X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduvddrjeeggddugeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgffothesthejghdtvddtvdenucfhrhhomhepfdetnhguhicujfgrlhhlfdcuoehfihigphgvrhhtihhsvgdqtghonhhsuhhlthhinhhgsegtohhmtggrshhtrdhnvghtqeenucfkphepjeefrddvvdefrdejgedrvdelnecurfgrrhgrmhephhgvlhhopeetnhguhighohhrkhdpihhnvghtpeejfedrvddvfedrjeegrddvledpmhgrihhlfhhrohhmpehfihigphgvrhhtihhsvgdqtghonhhsuhhlthhinhhgsegtohhmtggrshhtrdhnvghtpdhrtghpthhtoheptgihghifihhnsegthihgfihinhdrtghomhenucevlhhushhtvghrufhiiigvpedt
X-Xfinity-VMeta: sc=0;st=legit
From: "Andy Hall" <fixpertise-consulting AT comcast DOT net>
To: <cygwin AT cygwin DOT com>
Subject: Join command fails to output fields on input file with DOS line endings.
Date: Mon, 22 Jul 2019 12:50:46 -0700
Message-ID: <009e01d540c6$c1b11d50$451357f0$@comcast.net>
MIME-Version: 1.0
X-IsSubscribed: yes

This behavior of join surprised me: 

$ join -1 3 <(echo a b col3  c d | unix2dos) <(echo col3 f2 f3 f4 f5)
 f2 f3 f4 f5

Join parses the input line well enough to execute the join, but the presence of the DOS line endings suppresses the
output of fields from the first input.

Compare with

$ join -1 3 <(echo a b col3  c d) <(echo col3 f2 f3 f4 f5)
col3 a b c d f2 f3 f4 f5

which is correct.  

Here is a weirder example where the join field is missing and the output is reversed!

NOK
$ join <(echo col F1 | unix2dos) <(echo col F2)
 F2 F1

OK
$ join <(echo col F1) <(echo col F2)
col F1 F2






--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019