Guest User

Untitled

a guest
Oct 18th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. type t.txt
  2. this is a line
  3. #this is a commented line
  4. ;is this a commented line
  5. last line
  6.  
  7. for /f "usebackq tokens=* eol=; eol=#" %f in (`type t.txt`) do (echo "%f")
  8. "this is a line"
  9. ";is this a commented line"
  10. "last line"
  11.  
  12. for /f "usebackq tokens=* eol=;#" %f in (`type t.txt`) do (echo "%f")
  13. #" was unexpected at this time.
  14.  
  15. for /f "usebackq eol=; delims=" %%f in (`type t.txt`) do (
  16. for /f "eol=# delims=" %%Z in ("%%~f") do echo %%Z
  17. )
  18.  
  19. for /f "usebackq delims=" %%f in (`type t.txt^| findstr /i /b /v "; #"`) do ( echo %%f )
  20.  
  21. for /f "usebackq delims=" %f in (`type type.txt^| findstr /i /b /v "; #"`) do ( echo %f )
  22.  
  23. findstr /V /B "# ;" t.txt
Add Comment
Please, Sign In to add comment