A Simple Unix Filter in Racket - Learning the Racket Way
Overall, this is very pleasant code to review.  Especially given you're new to the language.  Your function names are follow convention such as the use of ending predicates with ? and indicating conversions with -&gt;.  The comments make this code easy to understand.  So bravo, keep at it!  That being said, here are some pretty minor suggestions.


"Favor define when feasible".  Your let's and let*'s could be changed to internal define's to decrease nesting.
Change (define (main) ...) to (module+ main ...).  Submodule support added in June's 5.3 release make having main's and test's easier than ever.
Within main, should one of the cond branches be using write-as-text instead of write-as-code?  right now, both branches do the same thing.  Along the same vein, the comment above write-as-text was copied but not changed from ;; write-as-code.
In racket, we have 3 ways of doing output, display, write, and print.  Since your write-as-text/code functions use printing, I would change the names of those functions to be called print-as-text/code