From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2384 invoked by alias); 26 Oct 2010 21:09:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15498 Received: (qmail 2223 invoked from network); 26 Oct 2010 21:09:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at ixian.com does not designate permitted sender hosts) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19655.16111.999209.381824@ixian.com> Date: Tue, 26 Oct 2010 13:49:51 -0700 To: zsh-users@zsh.org Cc: nix@myproxylists.com Subject: Re: How to capitalize last character of a string? In-Reply-To: References: X-Mailer: VM 7.19 under Emacs 22.2.1 From: Eric De Mund Reply-To: Eric De Mund nix, nix@myproxylists.com writes: ] Subject: How to capitalize last character of a string? ] Hi, as the subject says, any guidance? ] ] TEST="word" ] ] print "${(C)TEST[1]}$TEST[2,-1]" ] ] Capitalizes the first character but somehow I could not come up with ] solution other way. I'm not familiar with the syntax, but inferred the following. It seems to work: % TEST="word" % print "$TEST[1,-2]${(C)TEST[-1]}" worD % Regards, Eric -- Eric De Mund ead@ixian.com