From owner-freebsd-questions@FreeBSD.ORG Sat Sep 17 02:39:00 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8A2C16A41F for ; Sat, 17 Sep 2005 02:39:00 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from ezekiel.daleco.biz (southernuniform.com [66.76.92.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id F022943D45 for ; Sat, 17 Sep 2005 02:38:43 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from [192.168.2.2] ([69.27.149.254]) by ezekiel.daleco.biz (8.13.1/8.13.1) with ESMTP id j8H2bMQO018863; Fri, 16 Sep 2005 21:37:48 -0500 (CDT) (envelope-from kdk@daleco.biz) Message-ID: <432B8157.1030803@daleco.biz> Date: Fri, 16 Sep 2005 21:37:11 -0500 From: Kevin Kinsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.10) Gecko/20050823 X-Accept-Language: en-us, en MIME-Version: 1.0 To: infofarmer@gmail.com References: <015201c5bad6$78eaf940$dc96eed5@ihlasnetym> <20050916161035.GA14183@kuckucksei.jogla> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: how to convert lower case to uppercase in a word in a line ? 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, 17 Sep 2005 02:39:00 -0000 Andrew P. wrote: >On 9/16/05, Jonathan Glaschke wrote: > > >>Hello, >>On Fri, Sep 16, 2005 at 06:51:16PM +0300, Yavuz Maslak wrote: >> >> >>>Hello >>> >>>There is a word that consists lowercases. >>>How to change all of letters capital letters in stead of lowercase ? >>>is there any script about that ? >>>Thanks >>>_______________________________________________ >>> >>> >>Or you do this using perl: >> >>$ perl -e 'chomp && system("mv $_ ".uc($_)) foreach `ls`;' >> >> >> > >sed, awk, python, php, ruby, versions are to follow >shortly :) > > As requested: [kadmin@archangel][/www] # echo "foo" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' FOO [kadmin@archangel][/www] # echo "foo" | awk '{print toupper($1)}' FOO [kadmin@archangel][/www] # python -c "import string; i='foo'; o=str.upper(i); print(o);" FOO [kadmin@archangel][/www] # php -r 'echo strtoupper("foo");' FOO [kadmin@archangel][/www] # echo foo | ruby -p -e '$_.tr! "a-z", "A-Z"' FOO I don't know and can't find it in the manpages or at Google. I have heard of INTERCAL and BrainF*ck, but who cares.... next? :-D KDK P.S. In my opinion, PHP wins. But I'm sure my knowledge of PHP is the best of the five....