К основному контенту

Сообщения

Сообщения за ноября 6, 2020

Common Lisp| Example script download from internet with system utility on linux

;;(ql:quickload "drakma") ( sb-posix : chdir "/home/noname/projects/vvs" )   ( defun wget ( url ) ( sb-ext : run-program "/usr/bin/wget" ( list url ) : input nil : output *standard-output* ) )   ( wget "http://www.kulichki.com/cgi-bin/cgiwrap/masha/vysotsky/random-play/continuous-play.cgi" )   ( let ( ( x ( open "/home/noname/projects/vvs/continuous-play.cgi" ) ) ) ( when x ( loop for line = ( read-line x nil ) while line do ( wget ( subseq line 0 ( search "?" line ) ) ) ) ) ( close x ) )   ( write-line "DONE" )