Linux 如何使用csplit命令按天拆分日志文件?

Linux 如何使用csplit命令按天拆分日志文件?,linux,csplit,Linux,Csplit,我有一个类似于bellow的日志文件: Jan 01 This the log of this day. Jan 01 This the log of this day. Jan 01 This the log of this day. Jan 01 This the log of this day. Jan 01 This the log of this day. Jan 01 This the log of this day. Jan 01 This the log of th

我有一个类似于bellow的日志文件:

Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 01  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 02  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
Jan 03  This the log of this day.
我怎样才能按天分割文件?我使用命令:

csplit日志/*01年1月*/*02年1月*//*03年1月*/

但有一个错误:

csplit: /*Jan: closing delimiter '/' missing

谁能告诉我怎么解决这个问题?提前感谢。

shell将
/*Jan
视为一个参数,
01*/
视为另一个参数,依此类推。您需要引用具有嵌入空格的参数

csplit log '/*Jan 01*/' '/*Jan 02*/' '/*Jan 03*/'