delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/08/11/21:32:59

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE7B13857C6C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1597195932;
bh=gILDx1cCGjuLqJj+naXgqxSVlW8H36HW2Mhl8BTEZ38=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=BcqbWWgIBgaXacU0rpiBy/fIZh1GLh9HBcJOHFuLQ48698aZ3NeVlRLivmwFUUbdY
zPydPmQusby9AZkuAJFGDnvzC+Ngaq/aR0U7clL6i0Ey62T/RSLaQXy5jE3FNbuDtP
wFnGTr/nxbPT64KCUG8Ijxdld6R3n9iIdJFiK07c=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 57B0E3857C40
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=8qyEusCBB2gTKxnbnORQ5wgtrvzXqgKRdagL5SOxSV0=;
b=pUW45liZ8GE4WHvF9iVLnepmSo1CRSsyrlEk7fpEpVCByy+Aktmz6j34XYabcQW14S
/jhukN5x8Dqahbhm9kby04waAHbV/PtcM0c1z2AFJoB1UKMTSE1QBLznool927Zyqt2g
gAbTMtHxzWUR60aWMM3lONuofAwMmcOrlpz6ZiJ2SqKGod8Os86oAskwro/3neXDg5E1
B3bycIE6oWD5ZorEecjQDQaced/LDoz5F8oCM/9IntVMKXzh7dDiV6kWqEE17/39735/
gcGXPugzV2OdQzcGsgf3WDM01Kbx7d7brQMSTL49Bi7Y5jmRl64LBxozEgC4ACGIo/hI
FPCg==
X-Gm-Message-State: AOAM532HpCg28yVg7TVxv/KJ7lgY20uQ9w6h/C+OZ2ZWozorpBszcSuQ
+XRoOkrRJRS97M+3QMOfrBe4Tw5m
X-Google-Smtp-Source: ABdhPJxH5WajPP3Vx3qLE2Nl5YiEM6qW3as4+i64HxakQZlBJRp4/dP2Rl9GWkSyRKGPS3wGlW1A4g==
X-Received: by 2002:aca:cdc4:: with SMTP id d187mr5837287oig.69.1597195929467;
Tue, 11 Aug 2020 18:32:09 -0700 (PDT)
Subject: Re: Assistance with 'split -l' command
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
References: <SN1PR18MB20948BD85FE66ED40BFEB1B3E2450 AT SN1PR18MB2094 DOT namprd18 DOT prod DOT outlook DOT com>
Message-ID: <a370465a-dabf-6f79-2e07-da6eb499b8aa@gmail.com>
Date: Tue, 11 Aug 2020 20:32:22 -0500
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19)
Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0
MIME-Version: 1.0
In-Reply-To: <SN1PR18MB20948BD85FE66ED40BFEB1B3E2450@SN1PR18MB2094.namprd18.prod.outlook.com>
X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: =?utf-8?q?Ren=C3=A9_Berber_via_Cygwin?= <cygwin AT cygwin DOT com>
Reply-To: =?UTF-8?Q?Ren=c3=a9_Berber?= <rene DOT berber AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 8/11/2020 6:57 PM, Gary Vaughan via Cygwin wrote:

> I am working with csv files and when I perform the split -l, it
> splits the fioe correctly, but is putting the 'aa','ab','ac' after
> the file extension.  Would love to know how to get it after the file
> name before the file extension. as an exampole, command split -l 5000
> /desktop/ESM.csv /desktop/ESM.csv is resulting ESM/csvaa and would
> like it to be ESMaa.csv

`man split` is your friend.

Try: split -l 5000 --additional-suffix=.csv /desktop/ESM.csv 
/desktop/ESM.csv ESM

(all in one line)

It means split ... with resulting prefix "ESM", and suffix ".csv").

The command you show has default prefix x, no sufix, then the result 
should have been xaa, xab, xac, etc.
-- 
R. Berber

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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