commit 3be3aa9

chld  ·  2026-08-15 04:37:36 +0000 UTC
parent 3be3aa9
init cmd.scm
1 files changed,  +8, -0
+8, -0
1@@ -0,0 +1,8 @@
2+;; (open-input-pipe (format #t "echo ~a" (cadr (command-line))))
3+(define-module (cmd))
4+(use-modules (ice-9 popen)
5+	     (ice-9 rdelim))
6+
7+(define (system . a)
8+(let ((p (apply open-pipe* OPEN_READ a)))
9+  (display (read-string p))(close-pipe p)))