How to resolve the algorithm Execute a system command step by step in the Common Lisp programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Execute a system command step by step in the Common Lisp programming language
Table of Contents
Problem Statement
Run either the ls system command (dir on Windows), or the pause system command.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Execute a system command step by step in the Common Lisp programming language
Source code in the common programming language
(with-output-to-string (stream) (extensions:run-program "ls" nil :output stream))
(system:call-system "ls")
(trivial-shell:shell-command "ls")
; uiop is part of the de facto build system, asdf, so should be available to most installations.
; synchronous
(uiop:run-program "ls")
; async
(defparameter *process* (uiop:launch-program "ls"))
(uiop:wait-process *process*)
You may also check:How to resolve the algorithm Memory allocation step by step in the SNOBOL4 programming language
You may also check:How to resolve the algorithm Host introspection step by step in the OCaml programming language
You may also check:How to resolve the algorithm Quaternion type step by step in the Action! programming language
You may also check:How to resolve the algorithm Loops/Do-while step by step in the AppleScript programming language
You may also check:How to resolve the algorithm Exceptions/Catch an exception thrown in a nested call step by step in the TXR programming language