Batch - Extract every word on a line to a markdown link The Next CEO of Stack OverflowBatch...

What can we do to stop prior company from asking us questions?

Implement the Thanos sorting algorithm

How to Reset Passwords on Multiple Websites Easily?

MAZDA 3 2006 (UK) - poor acceleration then takes off at 3250 revs

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

What does "Its cash flow is deeply negative" mean?

When Does an Atlas Uniquely Define a Manifold?

How to use tikz in fbox?

Is it okay to store user locations?

Is HostGator storing my password in plaintext?

Robert Sheckley short story about vacation spots being overwhelmed

How can I quit an app using Terminal?

When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?

What is the point of a new vote on May's deal when the indicative votes suggest she will not win?

How do I go from 300 unfinished/half written blog posts, to published posts?

What is the purpose of the Evocation wizard's Potent Cantrip feature?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

If the heap is initialized for security, then why is the stack uninitialized?

How to get regions to plot as graphics

% symbol leads to superlong (forever?) compilations

Are there languages with no euphemisms?

How to count occurrences of text in a file?

Anatomically Correct Strange Women In Ponds Distributing Swords

Can a single photon have an energy density?



Batch - Extract every word on a line to a markdown link



The Next CEO of Stack OverflowBatch the “Extract Here” commandHow to Simplify windows batch script 2 steps into 1 - is it possibleFast NT batch script for determining path lengths in a folderbatch script to swap words / rename filesBatch metadata and text extraction of pdf filesHow to extract a string from last line in a text file -windows batch scriptScript to merge a specific line of multiple .txt files into one .txt fileinput same line as echo batch fileBatch extract files from every archive with 7-zipA cmd batch FOR /F command that will not open a text file












0















This is code from a call above it. I extract line 5 from a file with this code which leaves it in %%c. I then want to take each word in that line (there can be from 1 to nth words) and create a markdown link like



[word](word.html)


and append those to a txt file. This is what I have so far. If I have 10 words do I really have to add all the tokens in the command?



setlocal enabledelayedexpansion
set "lineNr=5"
set /a lineNr-=1
for /f "usebackq delims=" %%c in (`more +!lineNr! "%~1"`) DO (
for /f "tokens=* delims= " %%d in ("%%c") do (
echo [%%d]^(tags/%%d.html^) [%%e]^(tags/%%e.html^) ^<br^> >> index.txt
)








share



























    0















    This is code from a call above it. I extract line 5 from a file with this code which leaves it in %%c. I then want to take each word in that line (there can be from 1 to nth words) and create a markdown link like



    [word](word.html)


    and append those to a txt file. This is what I have so far. If I have 10 words do I really have to add all the tokens in the command?



    setlocal enabledelayedexpansion
    set "lineNr=5"
    set /a lineNr-=1
    for /f "usebackq delims=" %%c in (`more +!lineNr! "%~1"`) DO (
    for /f "tokens=* delims= " %%d in ("%%c") do (
    echo [%%d]^(tags/%%d.html^) [%%e]^(tags/%%e.html^) ^<br^> >> index.txt
    )








    share

























      0












      0








      0








      This is code from a call above it. I extract line 5 from a file with this code which leaves it in %%c. I then want to take each word in that line (there can be from 1 to nth words) and create a markdown link like



      [word](word.html)


      and append those to a txt file. This is what I have so far. If I have 10 words do I really have to add all the tokens in the command?



      setlocal enabledelayedexpansion
      set "lineNr=5"
      set /a lineNr-=1
      for /f "usebackq delims=" %%c in (`more +!lineNr! "%~1"`) DO (
      for /f "tokens=* delims= " %%d in ("%%c") do (
      echo [%%d]^(tags/%%d.html^) [%%e]^(tags/%%e.html^) ^<br^> >> index.txt
      )








      share














      This is code from a call above it. I extract line 5 from a file with this code which leaves it in %%c. I then want to take each word in that line (there can be from 1 to nth words) and create a markdown link like



      [word](word.html)


      and append those to a txt file. This is what I have so far. If I have 10 words do I really have to add all the tokens in the command?



      setlocal enabledelayedexpansion
      set "lineNr=5"
      set /a lineNr-=1
      for /f "usebackq delims=" %%c in (`more +!lineNr! "%~1"`) DO (
      for /f "tokens=* delims= " %%d in ("%%c") do (
      echo [%%d]^(tags/%%d.html^) [%%e]^(tags/%%e.html^) ^<br^> >> index.txt
      )






      batch extract markdown





      share












      share










      share



      share










      asked 8 mins ago









      tyeetyee

      63




      63






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1418892%2fbatch-extract-every-word-on-a-line-to-a-markdown-link%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1418892%2fbatch-extract-every-word-on-a-line-to-a-markdown-link%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...