Loading ...
Sorry, an error occurred while loading the content.

RE: [BATCH WORLD] Appending to EOL

Expand Messages
  • Morris, Lamar
    Ken, I ve tried it on both win2k and nt4 and the results are identical. I m sure it s something I m doing. The script immediately returns to the cmd prompt and
    Message 1 of 12 , Jan 12, 2004
    • 0 Attachment
      Ken, I've tried it on both win2k and nt4 and the results are identical. I'm
      sure it's something I'm doing.

      The script immediately returns to the cmd prompt and no file is written nor
      are there errors shown.



      I've confirmed that the script doesn't like what I'm trying to write " I
      changed the text to xxx and it worked as you specified, any ideas on how

      To make it write the"

      The files that I need to delete are on a NetApps box on a unix / nt cifs
      share, so I'm having to do it from the NT side.





      This is what I'm using.

      FOR /F "tokens=1* delims=" %%A IN (delme.txt) DO (echo %%A ")>>new2.txt



      This is what I'm doing it to.



      L:\pde\web\htdocs\swr\CRT3059814\removed_data\SIMS FullDownloader.zip.exe

      L:\pde\web\_private\MoviezChannelsInstaler.exe

      L:\pde\web\_vti_cnf\How To Hack Websites.exe

      L:\pde\web\_vti_pvt\MSN Password Hacker and Stealer.exe

      L:\pde\web\cgi-bin\_vti_cnf\How To Hack Websites.exe





      Your help is always much appreciated.



      Lamar



      -----Original Message-----
      From: kcmjr@... [mailto:kcmjr@...]
      Sent: Monday, January 12, 2004 3:18 PM
      To: batchworld@yahoogroups.com
      Cc: Morris, Lamar
      Subject: RE: [BATCH WORLD] Appending to EOL



      Lamar,

      I tested my solution by using a sample text file called "new1.txt" which
      contained a slew of lines like this:
      "1 the quick brown fox jumped over the lazy dogs back".

      The lines were labeled 1 thru 9 so I could see that they were all getting
      read. The exact text of the solution adds "extra text" to the new file.
      On my system the resulting new file called "new2.txt" contained the same
      lines but modified like this:
      "1 the quick brown fox jumped over the lazy dogs back extra text"

      I'm on Windows 2000 sp4, nothing special there so if you are on W2k also
      it should work the same. I can even email you the test files if you like.

      KCM





      "Morris, Lamar" <LamarMorris@...>
      01/12/2004 11:58 AM
      Please respond to batchworld


      To: batchworld@yahoogroups.com
      cc:
      Subject: RE: [BATCH WORLD] Appending to EOL


      Let me explain a little further I need to add " at the end of each line.

      Michael's script does this.

      c:\TMP\4>sed 's/.*/ & "/' delme.txt>delme1.txt

      c:/tmp/4/sed.exe: -e expression #1, char 5: Unterminated `s' command

      '"/' delme.txt>delme1.txt' is not recognized as an internal or external
      command,

      operable program or batch file.



      Ken your's gives not error or output.



      Lamar




      [Non-text portions of this message have been removed]



      To Post a message, send it to: batchworld@...

      To Unsubscribe, send a blank message to: batchworld-unsubscribe@...



      _____

      Yahoo! Groups Links

      * To visit your group on the web, go to:
      http://groups.yahoo.com/group/batchworld/
      <http://groups.yahoo.com/group/batchworld/>


      * To unsubscribe from this group, send an email to:
      batchworld-unsubscribe@yahoogroups.com
      <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>


      * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      <http://docs.yahoo.com/info/terms/> Service.



      [Non-text portions of this message have been removed]
    • kcmjr@onemain.com
      I think it s taking the quote as part of the command rather than a character. I recall reading something about if you want to echo a quote you need a special
      Message 2 of 12 , Jan 12, 2004
      • 0 Attachment
        I think it's taking the quote as part of the command rather than a
        character. I recall reading something about if you want to echo a quote
        you need a special character in front of it so the command processor
        doesn't think it's part of the command. I'll dig around and see if I can
        find the proper syntax. Also, don't you want quotes at the front and
        back? Seems odd to just end the line with a quote.

        Ken Mazie







        "Morris, Lamar" <LamarMorris@...>
        01/12/2004 02:09 PM
        Please respond to batchworld


        To: "'batchworld@yahoogroups.com'" <batchworld@yahoogroups.com>
        cc:
        Subject: RE: [BATCH WORLD] Appending to EOL


        Ken, I've tried it on both win2k and nt4 and the results are identical.
        I'm
        sure it's something I'm doing.

        The script immediately returns to the cmd prompt and no file is written
        nor
        are there errors shown.



        I've confirmed that the script doesn't like what I'm trying to write " I
        changed the text to xxx and it worked as you specified, any ideas on how

        To make it write the"

        The files that I need to delete are on a NetApps box on a unix / nt cifs
        share, so I'm having to do it from the NT side.

        This is what I'm using.

        FOR /F "tokens=1* delims=" %%A IN (delme.txt) DO (echo %%A ")>>new2.txt

        This is what I'm doing it to.

        L:\pde\web\htdocs\swr\CRT3059814\removed_data\SIMS FullDownloader.zip.exe
        L:\pde\web\_private\MoviezChannelsInstaler.exe
        L:\pde\web\_vti_cnf\How To Hack Websites.exe
        L:\pde\web\_vti_pvt\MSN Password Hacker and Stealer.exe
        L:\pde\web\cgi-bin\_vti_cnf\How To Hack Websites.exe

        Your help is always much appreciated.

        Lamar





        [Non-text portions of this message have been removed]
      • Morris, Lamar
        Thanks for your help, I m inserting del at the beginning using ultraedit in column / insert mode. Lamar ... From: kcmjr@onemain.com
        Message 3 of 12 , Jan 12, 2004
        • 0 Attachment
          Thanks for your help, I'm inserting del " at the beginning using ultraedit
          in column / insert mode.



          Lamar



          -----Original Message-----
          From: kcmjr@... [mailto:kcmjr@...]
          Sent: Monday, January 12, 2004 4:36 PM
          To: Morris, Lamar
          Cc: batchworld@yahoogroups.com
          Subject: RE: [BATCH WORLD] Appending to EOL



          I think it's taking the quote as part of the command rather than a
          character. I recall reading something about if you want to echo a quote
          you need a special character in front of it so the command processor
          doesn't think it's part of the command. I'll dig around and see if I can
          find the proper syntax. Also, don't you want quotes at the front and
          back? Seems odd to just end the line with a quote.

          Ken Mazie







          "Morris, Lamar" <LamarMorris@...>
          01/12/2004 02:09 PM
          Please respond to batchworld


          To: "'batchworld@yahoogroups.com'" <batchworld@yahoogroups.com>
          cc:
          Subject: RE: [BATCH WORLD] Appending to EOL


          Ken, I've tried it on both win2k and nt4 and the results are identical.
          I'm
          sure it's something I'm doing.

          The script immediately returns to the cmd prompt and no file is written
          nor
          are there errors shown.



          I've confirmed that the script doesn't like what I'm trying to write " I
          changed the text to xxx and it worked as you specified, any ideas on how

          To make it write the"

          The files that I need to delete are on a NetApps box on a unix / nt cifs
          share, so I'm having to do it from the NT side.

          This is what I'm using.

          FOR /F "tokens=1* delims=" %%A IN (delme.txt) DO (echo %%A ")>>new2.txt

          This is what I'm doing it to.

          L:\pde\web\htdocs\swr\CRT3059814\removed_data\SIMS FullDownloader.zip.exe
          L:\pde\web\_private\MoviezChannelsInstaler.exe
          L:\pde\web\_vti_cnf\How To Hack Websites.exe
          L:\pde\web\_vti_pvt\MSN Password Hacker and Stealer.exe
          L:\pde\web\cgi-bin\_vti_cnf\How To Hack Websites.exe

          Your help is always much appreciated.

          Lamar





          [Non-text portions of this message have been removed]



          To Post a message, send it to: batchworld@...

          To Unsubscribe, send a blank message to: batchworld-unsubscribe@...






          Yahoo! Groups Sponsor



          ADVERTISEMENT

          <http://rd.yahoo.com/SIG=12cij4dm8/M=267637.4116732.5333197.1261774/D=egroup
          web/S=1707208579:HM/EXP=1074033518/A=1853618/R=0/*http:/www.netflix.com/Defa
          ult?mqso=60178338&partid=4116732> click here



          <http://us.adserver.yahoo.com/l?M=267637.4116732.5333197.1261774/D=egroupmai
          l/S=:HM/A=1853618/rand=323380435>



          _____

          Yahoo! Groups Links

          * To visit your group on the web, go to:
          http://groups.yahoo.com/group/batchworld/
          <http://groups.yahoo.com/group/batchworld/>


          * To unsubscribe from this group, send an email to:
          batchworld-unsubscribe@yahoogroups.com
          <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>


          * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
          <http://docs.yahoo.com/info/terms/> Service.



          [Non-text portions of this message have been removed]
        • kcmjr@onemain.com
          Here s what I found: You can put a carat ^ before the quote to force it to be treated as text. Like this..... FOR /F tokens=1* delims= %%A IN (. new1.txt) DO
          Message 4 of 12 , Jan 12, 2004
          • 0 Attachment
            Here's what I found:

            You can put a carat ^ before the quote to force it to be treated as text.
            Like this.....
            FOR /F "tokens=1* delims=" %%A IN (.\new1.txt) DO (echo %%A ^")>>new2.txt

            Hope that fixes it.

            Ken Mazie







            "Morris, Lamar" <LamarMorris@...>
            01/12/2004 02:09 PM
            Please respond to batchworld


            To: "'batchworld@yahoogroups.com'" <batchworld@yahoogroups.com>
            cc:
            Subject: RE: [BATCH WORLD] Appending to EOL


            Ken, I've tried it on both win2k and nt4 and the results are identical.
            I'm
            sure it's something I'm doing.

            The script immediately returns to the cmd prompt and no file is written
            nor
            are there errors shown.



            I've confirmed that the script doesn't like what I'm trying to write " I
            changed the text to xxx and it worked as you specified, any ideas on how

            To make it write the"

            The files that I need to delete are on a NetApps box on a unix / nt cifs
            share, so I'm having to do it from the NT side.





            This is what I'm using.

            FOR /F "tokens=1* delims=" %%A IN (delme.txt) DO (echo %%A ")>>new2.txt



            This is what I'm doing it to.



            L:\pde\web\htdocs\swr\CRT3059814\removed_data\SIMS FullDownloader.zip.exe

            L:\pde\web\_private\MoviezChannelsInstaler.exe

            L:\pde\web\_vti_cnf\How To Hack Websites.exe

            L:\pde\web\_vti_pvt\MSN Password Hacker and Stealer.exe

            L:\pde\web\cgi-bin\_vti_cnf\How To Hack Websites.exe





            Your help is always much appreciated.



            Lamar



            -----Original Message-----
            From: kcmjr@... [mailto:kcmjr@...]
            Sent: Monday, January 12, 2004 3:18 PM
            To: batchworld@yahoogroups.com
            Cc: Morris, Lamar
            Subject: RE: [BATCH WORLD] Appending to EOL



            Lamar,

            I tested my solution by using a sample text file called "new1.txt" which
            contained a slew of lines like this:
            "1 the quick brown fox jumped over the lazy dogs back".

            The lines were labeled 1 thru 9 so I could see that they were all getting
            read. The exact text of the solution adds "extra text" to the new file.
            On my system the resulting new file called "new2.txt" contained the same
            lines but modified like this:
            "1 the quick brown fox jumped over the lazy dogs back extra text"

            I'm on Windows 2000 sp4, nothing special there so if you are on W2k also
            it should work the same. I can even email you the test files if you like.

            KCM





            "Morris, Lamar" <LamarMorris@...>
            01/12/2004 11:58 AM
            Please respond to batchworld


            To: batchworld@yahoogroups.com
            cc:
            Subject: RE: [BATCH WORLD] Appending to EOL


            Let me explain a little further I need to add " at the end of each line.

            Michael's script does this.

            c:\TMP\4>sed 's/.*/ & "/' delme.txt>delme1.txt

            c:/tmp/4/sed.exe: -e expression #1, char 5: Unterminated `s' command

            '"/' delme.txt>delme1.txt' is not recognized as an internal or external
            command,

            operable program or batch file.



            Ken your's gives not error or output.



            Lamar




            [Non-text portions of this message have been removed]



            To Post a message, send it to: batchworld@...

            To Unsubscribe, send a blank message to:
            batchworld-unsubscribe@...



            _____

            Yahoo! Groups Links

            * To visit your group on the web, go to:
            http://groups.yahoo.com/group/batchworld/
            <http://groups.yahoo.com/group/batchworld/>


            * To unsubscribe from this group, send an email to:
            batchworld-unsubscribe@yahoogroups.com
            <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>


            * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            <http://docs.yahoo.com/info/terms/> Service.



            [Non-text portions of this message have been removed]


            To Post a message, send it to: batchworld@...

            To Unsubscribe, send a blank message to:
            batchworld-unsubscribe@...

            Yahoo! Groups Links

            To visit your group on the web, go to:
            http://groups.yahoo.com/group/batchworld/

            To unsubscribe from this group, send an email to:
            batchworld-unsubscribe@yahoogroups.com

            Your use of Yahoo! Groups is subject to:
            http://docs.yahoo.com/info/terms/






            [Non-text portions of this message have been removed]
          • Morris, Lamar
            Works great. Thanks. Lamar ... From: kcmjr@onemain.com [mailto:kcmjr@onemain.com] Sent: Monday, January 12, 2004 5:04 PM To: Morris, Lamar Cc:
            Message 5 of 12 , Jan 12, 2004
            • 0 Attachment
              Works great.



              Thanks.



              Lamar



              -----Original Message-----
              From: kcmjr@... [mailto:kcmjr@...]
              Sent: Monday, January 12, 2004 5:04 PM
              To: Morris, Lamar
              Cc: batchworld@yahoogroups.com
              Subject: RE: [BATCH WORLD] Appending to EOL



              Here's what I found:

              You can put a carat ^ before the quote to force it to be treated as text.
              Like this.....
              FOR /F "tokens=1* delims=" %%A IN (.\new1.txt) DO (echo %%A ^")>>new2.txt

              Hope that fixes it.

              Ken Mazie







              "Morris, Lamar" <LamarMorris@...>
              01/12/2004 02:09 PM
              Please respond to batchworld


              To: "'batchworld@yahoogroups.com'" <batchworld@yahoogroups.com>
              cc:
              Subject: RE: [BATCH WORLD] Appending to EOL


              Ken, I've tried it on both win2k and nt4 and the results are identical.
              I'm
              sure it's something I'm doing.

              The script immediately returns to the cmd prompt and no file is written
              nor
              are there errors shown.



              I've confirmed that the script doesn't like what I'm trying to write " I
              changed the text to xxx and it worked as you specified, any ideas on how

              To make it write the"

              The files that I need to delete are on a NetApps box on a unix / nt cifs
              share, so I'm having to do it from the NT side.





              This is what I'm using.

              FOR /F "tokens=1* delims=" %%A IN (delme.txt) DO (echo %%A ")>>new2.txt



              This is what I'm doing it to.



              L:\pde\web\htdocs\swr\CRT3059814\removed_data\SIMS FullDownloader.zip.exe

              L:\pde\web\_private\MoviezChannelsInstaler.exe

              L:\pde\web\_vti_cnf\How To Hack Websites.exe

              L:\pde\web\_vti_pvt\MSN Password Hacker and Stealer.exe

              L:\pde\web\cgi-bin\_vti_cnf\How To Hack Websites.exe





              Your help is always much appreciated.



              Lamar



              -----Original Message-----
              From: kcmjr@... [mailto:kcmjr@...]
              Sent: Monday, January 12, 2004 3:18 PM
              To: batchworld@yahoogroups.com
              Cc: Morris, Lamar
              Subject: RE: [BATCH WORLD] Appending to EOL



              Lamar,

              I tested my solution by using a sample text file called "new1.txt" which
              contained a slew of lines like this:
              "1 the quick brown fox jumped over the lazy dogs back".

              The lines were labeled 1 thru 9 so I could see that they were all getting
              read. The exact text of the solution adds "extra text" to the new file.
              On my system the resulting new file called "new2.txt" contained the same
              lines but modified like this:
              "1 the quick brown fox jumped over the lazy dogs back extra text"

              I'm on Windows 2000 sp4, nothing special there so if you are on W2k also
              it should work the same. I can even email you the test files if you like.

              KCM





              "Morris, Lamar" <LamarMorris@...>
              01/12/2004 11:58 AM
              Please respond to batchworld


              To: batchworld@yahoogroups.com
              cc:
              Subject: RE: [BATCH WORLD] Appending to EOL


              Let me explain a little further I need to add " at the end of each line.

              Michael's script does this.

              c:\TMP\4>sed 's/.*/ & "/' delme.txt>delme1.txt

              c:/tmp/4/sed.exe: -e expression #1, char 5: Unterminated `s' command

              '"/' delme.txt>delme1.txt' is not recognized as an internal or external
              command,

              operable program or batch file.



              Ken your's gives not error or output.



              Lamar




              [Non-text portions of this message have been removed]



              To Post a message, send it to: batchworld@...

              To Unsubscribe, send a blank message to:
              batchworld-unsubscribe@...



              _____

              Yahoo! Groups Links

              * To visit your group on the web, go to:
              http://groups.yahoo.com/group/batchworld/
              <http://groups.yahoo.com/group/batchworld/>
              <http://groups.yahoo.com/group/batchworld/
              <http://groups.yahoo.com/group/batchworld/> >


              * To unsubscribe from this group, send an email to:
              batchworld-unsubscribe@yahoogroups.com
              <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>


              * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
              <http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/> >
              Service.



              [Non-text portions of this message have been removed]


              To Post a message, send it to: batchworld@...

              To Unsubscribe, send a blank message to:
              batchworld-unsubscribe@...

              Yahoo! Groups Links

              To visit your group on the web, go to:
              http://groups.yahoo.com/group/batchworld/
              <http://groups.yahoo.com/group/batchworld/>

              To unsubscribe from this group, send an email to:
              batchworld-unsubscribe@yahoogroups.com

              Your use of Yahoo! Groups is subject to:
              http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/>






              [Non-text portions of this message have been removed]



              To Post a message, send it to: batchworld@...

              To Unsubscribe, send a blank message to: batchworld-unsubscribe@...



              _____

              Yahoo! Groups Links

              * To visit your group on the web, go to:
              http://groups.yahoo.com/group/batchworld/
              <http://groups.yahoo.com/group/batchworld/>


              * To unsubscribe from this group, send an email to:
              batchworld-unsubscribe@yahoogroups.com
              <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>


              * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
              <http://docs.yahoo.com/info/terms/> Service.



              [Non-text portions of this message have been removed]
            • Michael Marquart
              On stardate Mon, 12 Jan 2004 15:04:11 -0800, while visiting Deep Space 9, ... That ll work, if there are no special characters within the text, and you don t
              Message 6 of 12 , Jan 12, 2004
              • 0 Attachment
                On stardate Mon, 12 Jan 2004 15:04:11 -0800, while visiting Deep Space 9,
                the changeling Founder kcmjr@... spake thusly:



                > Here's what I found:
                >
                > You can put a carat ^ before the quote to force it to be treated as text.
                > Like this.....
                > FOR /F "tokens=1* delims=" %%A IN (.\new1.txt) DO (echo %%A ^")>>new2.txt
                >
                > Hope that fixes it.
                >
                > Ken Mazie

                That'll work, if there are no "special" characters within the text, and you
                don't want to preserve blank lines.

                >
                > Let me explain a little further I need to add " at the end of each line.

                It needs quotes converted to a Hexidecimal representation, and that & needs
                to be escaped for NT.

                sed 's/.*/^&\x22/' delme.txt>delme1.txt


                If I understand it, the whole job could be done with

                sed 's/.*/del \x22^&\x22/' delme.txt>delme1.txt




                --
                Regards,
                Michael
              • Morris, Lamar
                Thanks Michael, this did just what I needed, it put the del at the front of the line and at the end of the line. This save me an extra step. Lamar _____
                Message 7 of 12 , Jan 13, 2004
                • 0 Attachment
                  Thanks Michael, this did just what I needed, it put the del " at the front
                  of the line and " at the end of the line. This save me an extra step.



                  Lamar



                  _____

                  From: Michael Marquart [mailto:micm@...]
                  Sent: Tuesday, January 13, 2004 12:47 AM
                  To: batchworld@yahoogroups.com
                  Subject: Re: [BATCH WORLD] Appending to EOL



                  On stardate Mon, 12 Jan 2004 15:04:11 -0800, while visiting Deep Space 9,
                  the changeling Founder kcmjr@... spake thusly:



                  > Here's what I found:
                  >
                  > You can put a carat ^ before the quote to force it to be treated as text.
                  > Like this.....
                  > FOR /F "tokens=1* delims=" %%A IN (.\new1.txt) DO (echo %%A ^")>>new2.txt
                  >
                  > Hope that fixes it.
                  >
                  > Ken Mazie

                  That'll work, if there are no "special" characters within the text, and you
                  don't want to preserve blank lines.

                  >
                  > Let me explain a little further I need to add " at the end of each line.

                  It needs quotes converted to a Hexidecimal representation, and that & needs
                  to be escaped for NT.

                  sed 's/.*/^&\x22/' delme.txt>delme1.txt


                  If I understand it, the whole job could be done with

                  sed 's/.*/del \x22^&\x22/' delme.txt>delme1.txt




                  --
                  Regards,
                  Michael


                  To Post a message, send it to: batchworld@...

                  To Unsubscribe, send a blank message to: batchworld-unsubscribe@...



                  _____

                  Yahoo! Groups Links

                  * To visit your group on the web, go to:
                  http://groups.yahoo.com/group/batchworld/
                  <http://groups.yahoo.com/group/batchworld/>

                  * To unsubscribe from this group, send an email to:
                  batchworld-unsubscribe@yahoogroups.com
                  <mailto:batchworld-unsubscribe@yahoogroups.com?subject=Unsubscribe>

                  * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
                  <http://docs.yahoo.com/info/terms/> .



                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.