Completing the count of charcters in every line

Multi tool use
Multi tool use

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











up vote
0
down vote

favorite












I want to know how to count the characters in every line in a document, then subtracting this number from a threshold represents the maximums number of characters allowed per line, then filling the gaps between the maximum number of characters and the count of characters with dashes. For example:



Unix was 
originally meant
to be a
co
nvenient p
latform for progra
mmers developing software to
be run on it and on other
systems, rather than for non-
programmers.
[7][8] The system grew larger
as the operating system star
ted spreading in a
cademic circ
les, as users add
ed their own tools to th
e system and shared them wi
th colleagues.


the maximum number of characters in the lines is 28 in line#10, I want the count of characters in every line to be 28 by filling it with dashes



Unix was , .....................
originally meant , .............
to be a , ......................
co, ............................
nvenient p, ....................
latform for progra, ............
mmers developing software to, ..
be run on it and on other , ....
systems, rather than for non-,..
programmers., ..................
[7][8] The system grew larger,..
as the operating system star, ..
ted spreading in a, ............
cademic circ, ..................
les, as users add, .............
ed their own tools to th, ......
e system and shared them wi, ...
th colleagues., ................


How can I do that in bash?
thanks!









share

























    up vote
    0
    down vote

    favorite












    I want to know how to count the characters in every line in a document, then subtracting this number from a threshold represents the maximums number of characters allowed per line, then filling the gaps between the maximum number of characters and the count of characters with dashes. For example:



    Unix was 
    originally meant
    to be a
    co
    nvenient p
    latform for progra
    mmers developing software to
    be run on it and on other
    systems, rather than for non-
    programmers.
    [7][8] The system grew larger
    as the operating system star
    ted spreading in a
    cademic circ
    les, as users add
    ed their own tools to th
    e system and shared them wi
    th colleagues.


    the maximum number of characters in the lines is 28 in line#10, I want the count of characters in every line to be 28 by filling it with dashes



    Unix was , .....................
    originally meant , .............
    to be a , ......................
    co, ............................
    nvenient p, ....................
    latform for progra, ............
    mmers developing software to, ..
    be run on it and on other , ....
    systems, rather than for non-,..
    programmers., ..................
    [7][8] The system grew larger,..
    as the operating system star, ..
    ted spreading in a, ............
    cademic circ, ..................
    les, as users add, .............
    ed their own tools to th, ......
    e system and shared them wi, ...
    th colleagues., ................


    How can I do that in bash?
    thanks!









    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want to know how to count the characters in every line in a document, then subtracting this number from a threshold represents the maximums number of characters allowed per line, then filling the gaps between the maximum number of characters and the count of characters with dashes. For example:



      Unix was 
      originally meant
      to be a
      co
      nvenient p
      latform for progra
      mmers developing software to
      be run on it and on other
      systems, rather than for non-
      programmers.
      [7][8] The system grew larger
      as the operating system star
      ted spreading in a
      cademic circ
      les, as users add
      ed their own tools to th
      e system and shared them wi
      th colleagues.


      the maximum number of characters in the lines is 28 in line#10, I want the count of characters in every line to be 28 by filling it with dashes



      Unix was , .....................
      originally meant , .............
      to be a , ......................
      co, ............................
      nvenient p, ....................
      latform for progra, ............
      mmers developing software to, ..
      be run on it and on other , ....
      systems, rather than for non-,..
      programmers., ..................
      [7][8] The system grew larger,..
      as the operating system star, ..
      ted spreading in a, ............
      cademic circ, ..................
      les, as users add, .............
      ed their own tools to th, ......
      e system and shared them wi, ...
      th colleagues., ................


      How can I do that in bash?
      thanks!









      share













      I want to know how to count the characters in every line in a document, then subtracting this number from a threshold represents the maximums number of characters allowed per line, then filling the gaps between the maximum number of characters and the count of characters with dashes. For example:



      Unix was 
      originally meant
      to be a
      co
      nvenient p
      latform for progra
      mmers developing software to
      be run on it and on other
      systems, rather than for non-
      programmers.
      [7][8] The system grew larger
      as the operating system star
      ted spreading in a
      cademic circ
      les, as users add
      ed their own tools to th
      e system and shared them wi
      th colleagues.


      the maximum number of characters in the lines is 28 in line#10, I want the count of characters in every line to be 28 by filling it with dashes



      Unix was , .....................
      originally meant , .............
      to be a , ......................
      co, ............................
      nvenient p, ....................
      latform for progra, ............
      mmers developing software to, ..
      be run on it and on other , ....
      systems, rather than for non-,..
      programmers., ..................
      [7][8] The system grew larger,..
      as the operating system star, ..
      ted spreading in a, ............
      cademic circ, ..................
      les, as users add, .............
      ed their own tools to th, ......
      e system and shared them wi, ...
      th colleagues., ................


      How can I do that in bash?
      thanks!







      bash





      share












      share










      share



      share










      asked 1 min ago









      Shervan

      34111




      34111

























          active

          oldest

          votes











          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%2f475198%2fcompleting-the-count-of-charcters-in-every-line%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475198%2fcompleting-the-count-of-charcters-in-every-line%23new-answer', 'question_page');

          );

          Post as a guest













































































          rhe7,JvWI9kBm6fJG gd7R xiaD7OV,n0gppCCILzt,s8VmMeIFW9q
          7gWBCbhn8uagWoz8BDsLgPAU5 wyIFiuQYzs,hANvudGvu s,tDmRjuaWhL04s1LtZ L,RGNWRs7w4qlihH

          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          How many registers does an x86_64 CPU actually have?

          Displaying single band from multi-band raster using QGIS