[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help improving an elisp 'GNU grep --version' query
From: |
Thien-Thi Nguyen |
Subject: |
Re: Need help improving an elisp 'GNU grep --version' query |
Date: |
Mon, 25 Aug 2003 13:01:51 -0400 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
ascott@sedona.intel.com (Andrew M. Scott) writes:
> result into a variable
try something like:
(nth 3 (split-string (shell-command-to-string "grep --version")))
the 3, being a hardcoded constant (that is neither 0 nor 1 ;-), should
be a hint that there is a code enhancement opportunity here...
alternatively, avoid the pitfalls of inferring/assigning meaning to
version numbers and do some kind of test on the program in question,
directly.
thi