refer to:#! /usr/bin/racket #lang racket/base "greeting to shell" (displayln "hello, racket scripting") (printf "given arguments: ~s\n" (current-command-line-arguments)) (require racket/system) ;; grep a word in the racket manual: $ the_script racket scheme (system (string-append "man " (vector-ref (current-command-line-arguments) 0) " | grep " (vector-ref (current-command-line-arguments) 1))) "bye~~~"
section 19.2 of `the racket guide': scripts.
section 14.4 of `the racket guide': processes.
没有评论:
发表评论