Created
October 25, 2019 17:55
-
-
Save htsign/980461940e4a965f795e1ba6b8209b5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import strformat | |
template until(cond: bool, body: untyped): untyped = | |
while (true): | |
if cond: break | |
body | |
for param in os.commandLineParams(): | |
if os.existsFile(param): | |
let f: File = open(param, FileMode.fmRead) | |
defer: f.close | |
echo fmt"==== ({param}) ====" | |
until f.endOfFile: | |
echo f.readLine | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment