shell-command bash. , shell-command bash, PATH. : " \" script elisp, PATH. , *Shell Command Output*.
(let ((path "PATH='/usr/local/bin:/usr/bin:/bin'")
(command "IFS=: read -ra _dirs_in_path <<< \"$PATH\"
for _dir in \"${_dirs_in_path[@]}\"; do
for _file in \"${_dir}\"/*; do
[[ -x ${_file} && -f ${_file} ]] && printf '%s\n' \"${_file##*/}\"
done
done"))
(shell-command (concat path ";" command)))
, compile bash.
PATH: (getenv "PATH") , , , X- ( xdm, gdm kdm) Xsession, emacs, GUI, bash. emacs --daemon cron, /etc/profile ~/.profile, Emacs PATH.
(. SO), , Emacs , PATH, .