sách gpt4 ai đã đi

linux - 如何在Linux中按标题将文本文件拆分为许多较小的文件

In lại 作者:太空宇宙 更新时间:2023-11-04 05:21:15 25 4
mua khóa gpt4 Nike

我有一个包含数百篇新闻文章的大型 txt 文件,我想按标题将其分成几个较小的 txt 文件。

有人可以告诉我该怎么做吗?

1 Câu trả lời

sử dụngsplit命令进行分割。

$ split --help
Usage: split [OPTION]... [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT
is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
-a, --suffix-length=N use suffixes of length N (default 2)
-b, --bytes=SIZE put SIZE bytes per output file
-C, --line-bytes=SIZE put at most SIZE bytes of lines per output file
-d, --numeric-suffixes use numeric suffixes instead of alphabetic
-l, --lines=NUMBER put NUMBER lines per output file
--verbose print a diagnostic just before each
output file is opened
--help display this help and exit
--version output version information and exit

SIZE may be (or may be an integer optionally followed by) one of following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

关于linux - 如何在Linux中按标题将文本文件拆分为许多较小的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41740338/

25 4 0
太空宇宙
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com