How can i execute a shell (bash) command within a Common Lisp program and assign the output to a variable?
You can consider using Trivial-shell (url)
(trivial-shell:shell-command "echo foo")
shell-command returns output, so you can assign it to a variable.
In asdf.lisp file you can read:
;;;; We probably should move this functionality to its own system and deprecate
;;;; use of it from the asdf package. However, this would break unspecified
;;;; existing software, so until a clear alternative exists, we can't deprecate
;;;; it, and even after it's been deprecated, we will support it for a few
;;;; years so everyone has time to migrate away from it. -- fare 2009-12-01