Skip to content

Instantly share code, notes, and snippets.

@thedeemon
Created January 28, 2024 17:51

Revisions

  1. thedeemon revised this gist Jan 28, 2024. No changes.
  2. thedeemon renamed this gist Jan 28, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. thedeemon created this gist Jan 28, 2024.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #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))