Skip to content

Instantly share code, notes, and snippets.

@thedeemon
Created January 28, 2024 17:51
Show Gist options
  • Save thedeemon/84c10d2f18fbd022bb48708f45eed4db to your computer and use it in GitHub Desktop.
Save thedeemon/84c10d2f18fbd022bb48708f45eed4db to your computer and use it in GitHub Desktop.
#lang racket/base
(require racket/file racket/string)
(for ([fname (current-command-line-arguments)])
(displayln fname)
(define ls (file->lines fname))
(display-lines-to-file
(map (λ (s) (string-trim (string-replace s "\t" " ") " " #:left? #f #:repeat? #t)) ls)
fname #:exists 'replace))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment