From owner-freebsd-questions@FreeBSD.ORG Sat Mar 27 06:31:23 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14D40106566B for ; Sat, 27 Mar 2010 06:31:23 +0000 (UTC) (envelope-from invalid.pointer@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id C27338FC0C for ; Sat, 27 Mar 2010 06:31:22 +0000 (UTC) Received: by gwj15 with SMTP id 15so5260523gwj.13 for ; Fri, 26 Mar 2010 23:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=tGA0Y3QRPqvgIv1xcWYM17R/xMHqpUwyPs7DxySH0TQ=; b=uqI/GkiYIu+Ogwwgu94e5Q0G5INcA+OfzcJzPCIMnDVxPDz1Vr6Bv+klsmCTswj0D2 8t7w/6LvAwovRr2+WY/ni3qYlAzjytFMhLl5qAHaBT7hFI8caAC8MUXl8fPhn9mUX/BV sbG3iP3hKdk3ShZ5YoLzZsDbJMygPZ1iwkoz4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=vNSMmCwRYCvOfM0SxLNhPO1Uc2GqEtLDIZccK2ra3pX905DDhkooG9Ng3t8LH+mJ7g 0yjd2oU7t/bk0UXAFb4iBUkAxRE3e0bBHPHLuqw5RfdksLxA+QeTUccBqtU2aNoEd8rX 9giwlAq65WokhRBFYWaOnfGsN/CkbZ/J2e1BE= Received: by 10.150.180.2 with SMTP id c2mr2419088ybf.314.1269671481879; Fri, 26 Mar 2010 23:31:21 -0700 (PDT) Received: from [192.168.1.78] ([122.177.190.81]) by mx.google.com with ESMTPS id 22sm1524698iwn.0.2010.03.26.23.31.19 (version=SSLv3 cipher=RC4-MD5); Fri, 26 Mar 2010 23:31:20 -0700 (PDT) Message-ID: <4BAE5627.5010802@gmail.com> Date: Sat, 27 Mar 2010 12:01:59 -0700 From: Manish Jain User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Question about expr X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2010 06:31:23 -0000 Hello all, I am used to the normal GNU-version of expr (also available on Solaris) and much prefer it over the FreeBSD version. The GNU version allows internal commands like length, substring and others which make it much easier to work with. Is there any way I can replace FreeBSD's native expr with the GNU version ? Since I believe expr does not normally ship as a shell-builtin, I don't think the shell can of much help in the matter. Actually, I think it might not be a bad idea to place a port of GNU-expr in the ports directory. This would allow a lot a scripts to be readily portable to multiple environments. Thanks for any help. Regards Manish Jain invalid.pointer@gmail.com