Windows SOLVED

Discussion in 'Software' started by Margo Baggins, 22 May 2012.

  1. Margo Baggins

    Margo Baggins I'm good at Soldering Super Moderator

    Joined:
    28 May 2010
    Posts:
    5,650
    Likes Received:
    268
    Hello,

    I dont get what is going on when a script does

    echo.>> %systemdrive%\whatever.log

    It's the echo. that I don't get, I get that the >> is redirect standard output, so it is writing stuff to a file and obviously %systemdrive%\whatever.txt means its going to write it to the file whatever.txt in my C: disk (for example).......so what is echo. doing?

    here is some more script:

    Code:
    sed.exe s/\\??\\// %temp%\rks1.log > %temp%\rkstart.log
    sed.exe s/\\??\\// %temp%\rke1.log > %temp%\rkend.log
    
    FINDSTR -LIVXG:%temp%\rkend.log %temp%\rkstart.log | FINDSTR -VI -G:wl.txt >> %SystemDrive%\whatever.log
    
    proxycheck.exe >> %SystemDrive%\whatever.log
    
    echo.>> %SystemDrive%\whatever.log
    echo.>> %SystemDrive%\whatever.log
    So, sed.exe is a text editor/manipulator which is changing the format of those log's that have already been collected, the next statement is writing some of the output from those two just edited text files in the master log, proxycheck.exe is doing its thing and writing the output to the log - then what happens next?! I don't know what it's doing, and I don't know why it's doing it twice!
     
    Last edited: 22 May 2012
  2. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,946
    Likes Received:
    269
    Well, guess what - "echo ." writes one character - . :) (if you don't believe me, fire up your command prompt and type "echo ." and press enter)

    In other words -
    echo - write
    . - one dot
    >> append to the end of the file we redirect the output to
    %SystemDrive%\whatever.log - name of the file where the output has been redirected.

    In short, it writes two dots at the end of the file. Probably a "progress indicator", or a indicator that processing finished ?
     
    Last edited: 22 May 2012
    Margo Baggins likes this.
  3. Margo Baggins

    Margo Baggins I'm good at Soldering Super Moderator

    Joined:
    28 May 2010
    Posts:
    5,650
    Likes Received:
    268
    that's so annoying. massively a case of over thinking. I didn't think it would be as simple as that I thought it was doing something much better!

    Thanks :)
     

Share This Page