What is the difference between split -C and split -b?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












According to the man page:



-b, --bytes=SIZE
put SIZE bytes per output file

-C, --line-bytes=SIZE
put at most SIZE bytes of lines per output file


So if -b already splits a file by bytes per file, what is the purpose of -C? How is it any different?







share|improve this question
























    up vote
    0
    down vote

    favorite












    According to the man page:



    -b, --bytes=SIZE
    put SIZE bytes per output file

    -C, --line-bytes=SIZE
    put at most SIZE bytes of lines per output file


    So if -b already splits a file by bytes per file, what is the purpose of -C? How is it any different?







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      According to the man page:



      -b, --bytes=SIZE
      put SIZE bytes per output file

      -C, --line-bytes=SIZE
      put at most SIZE bytes of lines per output file


      So if -b already splits a file by bytes per file, what is the purpose of -C? How is it any different?







      share|improve this question












      According to the man page:



      -b, --bytes=SIZE
      put SIZE bytes per output file

      -C, --line-bytes=SIZE
      put at most SIZE bytes of lines per output file


      So if -b already splits a file by bytes per file, what is the purpose of -C? How is it any different?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 1 at 19:05









      Jeff Reeves

      82




      82




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          -C attempts to put complete lines of output into the target file, up to a maximum size of SIZE, whereas -b just counts bytes without regards to line endings. -C may put less output into the output file in order to stop at the closest line ending that doesn't put it over size.






          share|improve this answer




















          • So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
            – Jeff Reeves
            Feb 2 at 0:21










          • That's it in a nutshell. Much more succinctly explained than my answer. :)
            – Tim Kennedy
            Feb 2 at 17:51











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421267%2fwhat-is-the-difference-between-split-c-and-split-b%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          -C attempts to put complete lines of output into the target file, up to a maximum size of SIZE, whereas -b just counts bytes without regards to line endings. -C may put less output into the output file in order to stop at the closest line ending that doesn't put it over size.






          share|improve this answer




















          • So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
            – Jeff Reeves
            Feb 2 at 0:21










          • That's it in a nutshell. Much more succinctly explained than my answer. :)
            – Tim Kennedy
            Feb 2 at 17:51















          up vote
          0
          down vote



          accepted










          -C attempts to put complete lines of output into the target file, up to a maximum size of SIZE, whereas -b just counts bytes without regards to line endings. -C may put less output into the output file in order to stop at the closest line ending that doesn't put it over size.






          share|improve this answer




















          • So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
            – Jeff Reeves
            Feb 2 at 0:21










          • That's it in a nutshell. Much more succinctly explained than my answer. :)
            – Tim Kennedy
            Feb 2 at 17:51













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          -C attempts to put complete lines of output into the target file, up to a maximum size of SIZE, whereas -b just counts bytes without regards to line endings. -C may put less output into the output file in order to stop at the closest line ending that doesn't put it over size.






          share|improve this answer












          -C attempts to put complete lines of output into the target file, up to a maximum size of SIZE, whereas -b just counts bytes without regards to line endings. -C may put less output into the output file in order to stop at the closest line ending that doesn't put it over size.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 1 at 19:10









          Tim Kennedy

          13.4k22949




          13.4k22949











          • So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
            – Jeff Reeves
            Feb 2 at 0:21










          • That's it in a nutshell. Much more succinctly explained than my answer. :)
            – Tim Kennedy
            Feb 2 at 17:51

















          • So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
            – Jeff Reeves
            Feb 2 at 0:21










          • That's it in a nutshell. Much more succinctly explained than my answer. :)
            – Tim Kennedy
            Feb 2 at 17:51
















          So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
          – Jeff Reeves
          Feb 2 at 0:21




          So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right?
          – Jeff Reeves
          Feb 2 at 0:21












          That's it in a nutshell. Much more succinctly explained than my answer. :)
          – Tim Kennedy
          Feb 2 at 17:51





          That's it in a nutshell. Much more succinctly explained than my answer. :)
          – Tim Kennedy
          Feb 2 at 17:51













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421267%2fwhat-is-the-difference-between-split-c-and-split-b%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)