# Split text file in multiline message ( Csplit equivalent)

**URL:** <https://discourse.nodered.org/t/split-text-file-in-multiline-message-csplit-equivalent/37312>\
**Category:** General\
**Created:** [10 December 2020 17:03 UTC](https://discourse.nodered.org/t/split-text-file-in-multiline-message-csplit-equivalent/37312 "2020-12-10T17:03:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnclePhil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/unclephil/32/33422_2.png) [@UnclePhil](https://discourse.nodered.org/u/UnclePhil)\
**Post date:** [10 December 2020 17:03 UTC](https://discourse.nodered.org/t/split-text-file-in-multiline-message-csplit-equivalent/37312/1 "2020-12-10T17:03:28Z")

</div>

Hello,  
I'm searching a way to split text file based on specific pattern, and then send each part to another node  
I know we can emulate this with a _csplit_ linux command, and then loop through file , but if your NRed is dockerized, you need to inject csplit executable during the build process, and i don't like to rebuild a container for each new NRed release

Did someone have a node, a flow or any other idea to start ??

Best regards  
Ph Koenig

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 December 2020 17:16 UTC](https://discourse.nodered.org/t/split-text-file-in-multiline-message-csplit-equivalent/37312/2 "2020-12-10T17:16:07Z")

</div>

Welcome to the forum @UnclePhil.

Will the built in Split node do what you want? If not then please provide more details of what you need to do.

---

<div class="post-metadata">

**Author:** ![UnclePhil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/unclephil/32/33422_2.png) [@UnclePhil](https://discourse.nodered.org/u/UnclePhil)\
**Post date:** [10 December 2020 17:27 UTC](https://discourse.nodered.org/t/split-text-file-in-multiline-message-csplit-equivalent/37312/3 "2020-12-10T17:27:21Z")

</div>

Can you explain why we are searching complications during 5 hours when a solution is in the left column ...... 😱  
I'm going to test this with this node that i use in many other projects ....  
Many thank's to add light in my day

Best regards  
Ph Koenig

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 February 2021 17:27 UTC](https://discourse.nodered.org/t/split-text-file-in-multiline-message-csplit-equivalent/37312/4 "2021-02-08T17:27:23Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
