Some potential duplicates may be the following:
How to ignore specific lines from being redirected
BUT I can't extrapolate from that to solve my problem. So, I am asking here instead.
So, here is what I got so far:
sbcl --noinform --non-interactive --eval "(ql:quickload :lambda-calculus-compiler)" < test.lisp > x.txt
I am trying to evaluate a lisp file, read a text file test.lisp
and use it as the input code to (ql:quickload :lambda-calculus-compiler
. When loading this a function gets called the reads which will read the contents in test.lisp
and then this evaluation will be redirected to x.txt
.
Here are the contents of x.txt
after this operation:
To load "lambda-calculus-compiler":
Load 1 ASDF system:
lambda-calculus-compiler
; Loading "lambda-calculus-compiler"
(((LAMBDA (N) (LAMBDA (M) (LAMBDA (F) (LAMBDA (Z) ((M F) ((N F) Z))))))
(LAMBDA (F) (LAMBDA (Z) (F (F (F Z))))))
(LAMBDA (F) (LAMBDA (Z) (F (F (F Z))))))
I want to ignore or get rid of
To load "lambda-calculus-compiler":
Load 1 ASDF system:
lambda-calculus-compiler
; Loading "lambda-calculus-compiler"
which is the output of (ql:quickload :lambda-calculus-compiler)
.
Any help will be appreciated. Please don't mark this a duplicate. As I mentioned I can't extrapolate from answers like the one I linked above.
Thanks.
sed '1,/Loading "lambda-calculus-compiler"/ d'
, which removes the lines starting with 1 through the one containing that phrase. However, that may not be your best option. I'm not familiar with sbcl, but you should read its man page and see if it has options to suppress that output to start with.--noprint
or--noinform
maybe?