On Tue, 10 Nov 2009 12:10:13 +0100
Lise Didillon <ldidil...@prologue.fr> wrote:

> type -t $1 2>/dev/null |grep -qi built
-t is bash specific.

Unfortunately POSIX not specify any machine-readable way to do such
checking. In particular it doesn't specify format of type built-in
output [1]. So I suggest the only semi-accurate way is to call type as
LANG=C type "$1"

BTW, can you tell me which shell do you use as /bin/sh and which
locale?

[1] http://www.opengroup.org/onlinepubs/009695399/utilities/type.html

-- 
Best regards,
 Alexander GQ Gerasiov

 Contacts:
 e-mail:    g...@cs.msu.su             Jabber:  g...@jabber.ru
 Homepage:  http://gq.net.ru         ICQ:     7272757
 PGP fingerprint: 04B5 9D90 DF7C C2AB CD49  BAEA CA87 E9E8 2AAC 33F1

Attachment: signature.asc
Description: PGP signature

Reply via email to