Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo off
- set fichier_yaml=fichier.yml
- setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
- echo.>output.txt
- for /f "eol=# tokens=*" %%L in (%fichier_yaml%) do (
- set ligne=%%L
- set prefix=!ligne:~0,1!
- set body=!ligne:~4!
- if "!body!"=="" set body=null
- if "!prefix!"=="c" echo !body!>>output.txt
- if "!prefix!"=="s" echo ^| !body!>>output.txt
- if "!prefix!"=="t" echo ^| ^| !body!>>output.txt
- if "!prefix!"=="@" if "!ligne:~0,3!"=="@@@" echo.>>output.txt
- )
- endlocal
- notepad output.txt
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement