DragonHawk

OneLine.CMD

May 16th, 2012
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.45 KB | None | 0 0
  1. @ECHO OFF
  2.  
  3. REM OneLine.CMD - batch script for Windows NT CMD command prompt
  4. REM reads standard input
  5. REM writes all input back out as a single of text
  6. REM if standard input is the console (default), use CTRL+Z to end input
  7. REM to read a file, use input redirection: OneLine.CMD < FILE.TXT
  8.  
  9. SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  10.  
  11. SET ACCUMULATOR=
  12.  
  13. FOR /F "tokens=*" %%A IN ('more') DO SET ACCUMULATOR=!ACCUMULATOR!%%A
  14.  
  15. ECHO %ACCUMULATOR%
Advertisement
Add Comment
Please, Sign In to add comment