Comment detail

条件を満たす行を取り除く (Nested Flatten)
使用例: (erase-commen-out-line 入力ファイル 出力ファイル)
1
2
3
4
5
6
7
8
9
(defun erase-comment-out-line (infile outfile)
  (with-open-file (in infile :direction :input)
    (with-open-file (out outfile :direction :output
					    :if-exists :supersede)
      (do ((line (read-line in nil 'eof)
		 (read-line in nil 'eof)))
	  ((eql line 'eof) 'Done)
	(unless (equal (schar line 0) #\#)
	  (write-line line out))))))

Index

Feed

Other

Link

Pathtraq

loading...