Forrest logo
back to context overview

csplit

List of commands for csplit:

  • csplit:tldr:12694 csplit: Split a file at a line matching a regular expression.
    $ csplit ${filename} /${regular_expression}/
    try on your machine
    explain this command
  • csplit:tldr:617b3 csplit: Split a file at lines 5 and 23.
    $ csplit ${filename} ${5} ${23}
    try on your machine
    explain this command
  • csplit:tldr:a4bfa csplit: Split a file every 5 lines, ignoring exact-division error.
    $ csplit -k ${filename} ${5} {*}
    try on your machine
    explain this command
  • csplit:tldr:d73d4 csplit: Split a file every 5 lines (this will fail if the total number of lines is not divisible by 5).
    $ csplit ${filename} ${5} {*}
    try on your machine
    explain this command
  • csplit:tldr:f592f csplit: Split a file at line 5 and use a custom prefix for the output files.
    $ csplit ${filename} ${5} -f ${prefix}
    try on your machine
    explain this command
back to context overview