public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Assistance with 'split -l' command
@ 2020-08-11 23:57 Gary Vaughan
  2020-08-12  1:32 ` René Berber
  2020-08-12 15:24 ` Andrey Repin
  0 siblings, 2 replies; 5+ messages in thread
From: Gary Vaughan @ 2020-08-11 23:57 UTC (permalink / raw)
  To: cygwin

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


Gary Vaughan
Analyst
Calero-MDSL
o:+1 469-808-3047
www.calero.com<https://www.calero.com>
www.mdsl.com<https://www.mdsl.com>


CONFIDENTIALITY NOTICE: This e-mail transmission and any attachments to it is information belonging to the sender and is intended only for the use of the individual or entity named above and the privilege and the privileges are not waived by virtue of having been sent by e-mail. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete the original transmission and its attachments without reading or saving in any manner.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Assistance with 'split -l' command
  2020-08-11 23:57 Assistance with 'split -l' command Gary Vaughan
@ 2020-08-12  1:32 ` René Berber
  2020-08-12 15:24 ` Andrey Repin
  1 sibling, 0 replies; 5+ messages in thread
From: René Berber @ 2020-08-12  1:32 UTC (permalink / raw)
  To: cygwin

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Assistance with 'split -l' command
  2020-08-11 23:57 Assistance with 'split -l' command Gary Vaughan
  2020-08-12  1:32 ` René Berber
@ 2020-08-12 15:24 ` Andrey Repin
  2020-08-12 15:53   ` Gary Vaughan
  2020-08-13 12:12   ` Mark Hansen
  1 sibling, 2 replies; 5+ messages in thread
From: Andrey Repin @ 2020-08-12 15:24 UTC (permalink / raw)
  To: Gary Vaughan, cygwin

Greetings, Gary Vaughan!

> I am working with csv files and when I perform the split -l, it splits the
> file correctly, but is putting the 'aa','ab','ac' after the file extension.

Be very careful to use generic text tools on CSV files.
On any non-textual files, actually.


-- 
With best regards,
Andrey Repin
Wednesday, August 12, 2020 18:22:46

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Assistance with 'split -l' command
  2020-08-12 15:24 ` Andrey Repin
@ 2020-08-12 15:53   ` Gary Vaughan
  2020-08-13 12:12   ` Mark Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: Gary Vaughan @ 2020-08-12 15:53 UTC (permalink / raw)
  To: cygwin

Thank you for the reply and information.


Gary Vaughan
Analyst
Calero-MDSL
o:+1 469-808-3047
www.calero.com<https://www.calero.com>
www.mdsl.com<https://www.mdsl.com>


CONFIDENTIALITY NOTICE: This e-mail transmission and any attachments to it is information belonging to the sender and is intended only for the use of the individual or entity named above and the privilege and the privileges are not waived by virtue of having been sent by e-mail. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete the original transmission and its attachments without reading or saving in any manner.

________________________________
From: Andrey Repin <anrdaemon@yandex.ru>
Sent: Wednesday, August 12, 2020 10:24 AM
To: Gary Vaughan <gary.vaughan@mdsl.com>; cygwin@cygwin.com <cygwin@cygwin.com>
Subject: Re: Assistance with 'split -l' command

WARNING! EXTERNAL EMAIL: Please confirm its authenticity before acting on any requests it may contain.
________________________________

Greetings, Gary Vaughan!

> I am working with csv files and when I perform the split -l, it splits the
> file correctly, but is putting the 'aa','ab','ac' after the file extension.

Be very careful to use generic text tools on CSV files.
On any non-textual files, actually.


--
With best regards,
Andrey Repin
Wednesday, August 12, 2020 18:22:46

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Assistance with 'split -l' command
  2020-08-12 15:24 ` Andrey Repin
  2020-08-12 15:53   ` Gary Vaughan
@ 2020-08-13 12:12   ` Mark Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Hansen @ 2020-08-13 12:12 UTC (permalink / raw)
  To: cygwin

On 8/12/2020 8:24 AM, Andrey Repin wrote:
> Greetings, Gary Vaughan!
> 
>> I am working with csv files and when I perform the split -l, it splits the
>> file correctly, but is putting the 'aa','ab','ac' after the file extension.
> 
> Be very careful to use generic text tools on CSV files.
> On any non-textual files, actually.
> 
> 

I agree with your comment regarding non-text files, but a CSV file is a textual file.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-13 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 23:57 Assistance with 'split -l' command Gary Vaughan
2020-08-12  1:32 ` René Berber
2020-08-12 15:24 ` Andrey Repin
2020-08-12 15:53   ` Gary Vaughan
2020-08-13 12:12   ` Mark Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).