Skip to content

Instantly share code, notes, and snippets.

@ishideo
Created April 6, 2018 08:12
Show Gist options
  • Save ishideo/8b92b7c63bf1854f88524d09a7a573a6 to your computer and use it in GitHub Desktop.
Save ishideo/8b92b7c63bf1854f88524d09a7a573a6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env gosh
(use file.util)
(define (main args)
(let1 lines (file->list read-line "temp.tmpl")
(let loop ((r "")
(lis lines))
(if (null? lis)
(print r)
(loop (string-append r (regexp-replace-all #/id/ (car lis) (cadr args)) "\n")
(cdr lis)))))
0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment