help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Examining the output of a shell command?


From: Pascal J. Bourguignon
Subject: Re: Examining the output of a shell command?
Date: Sun, 28 Jun 2015 15:57:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Raffaele Ricciardi <rfflrccrd@gmail.com> writes:

> I would like to analyse the escape sequences emitted by a shell
> command. I have tried with `shell-command` and
> `shell-command-to-string`, but escape sequences are stripped away.

Nope. Try a better lie.

(shell-command-to-string "echo $RED hello $NORMAL")
--> "[31m hello [0m
"

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]