Before proceeding, notice that the type option (-t) on final-join.txt ignores \n newlines when reading in characters one at a time. Read suffices for the purpose of this recipe, but the reader should be aware that read/cat are not the best tools for this type of work.
- Creating the script was trivial and for the most part shouldn't look like it came from the planet Mars.
- Running the $ bash file-splitter.sh -i input-lines -t line -l 10 command should produce three files, all of which are input-lines {1,...,3}. The reason that there is three files is that if you used the same input, which is 22 lines long, it will produce three files (10+10+2). Using read and echo using a concatenated buffer (${BUFFER}), we can write to the ...