From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12120 invoked from network); 28 Jun 2021 22:34:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Jun 2021 22:34:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1624919659; b=unhEWcV4k8tzreOq1CpCf79SBgRS+/TxEXXbCuO28lYR1Sq4RDOrKPW3QTaGhCWJm6/l61EZOb 0kGdPwJFYpepQSCWv0RfO3Xjncluwgz7qs8KAPyiKXSann/IVbRTwn7TI/FerxXNaH3KJ+BsiJ RQ8LiNDntH6AFgqSyy7xzMQBqFd79ocIPRmeFlFhUwdbjh9qaLJJeoWS4RoAcjznR9rfysgOkI Pde7bm8gZyDF3h1gNdO7QEJiSMh/YtHJj4hjWQaothe7ETMyZCo3RlF5a6y85w6Fq1MOJnR8XP KOubQhcFx93Lo2uw3ACyjSwinJHodMkIWEbp2u2YID5muw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail.covisp.net) smtp.remote-ip=65.121.55.42; dmarc=none header.from=covisp.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1624919659; bh=mpUE71D63EJuLZNJ0lhqj1cIQcS/nz7c8gcGiZc5qt4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Date: In-Reply-To:From:Subject:Content-Type:DKIM-Signature; b=DaVVSdBJSHfKEx5pS/QKqU7XKEzicDiKLOd05iPywe24pvkj9HuBhUrCRc049urgckMDq/qjXF E1YuCI4e00JwWy1vd1eT5OUf7eD/zwqf+b0RCF7MGIzoD0cgA2+sgZAVe+o6Oi1W1r+GnAIAlD 2aJNqdYP6+1OXxbBc1YUpcRiqqaxzyideaXufRE/tWJ7sVHtgek66R6zmyARW0s84MznE/kavj +WRU3uqGR+1OLHJu7b0H7m7YPIsVg9tA9JZPZJjHyXSv0xyJkf4pIZA5ZVemEXSspBJ8uyeT4f mWEJJdL8V7XZqKbuSsupOHBGK3Mkh1PxC7nXDoUyws5jHQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:To:References:Message-Id: Content-Transfer-Encoding:Date:In-Reply-To:From:Subject:Content-Type:Reply-To :Cc:MIME-Version:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+NvbUd1cnW6m6Qbwhi82/HC6QrMAyECxzphmQd8j7SQ=; b=uUq7M5bKwNOKkaetf7oXnn7+6d XDwyeftlRllhbHc4BAc+E2pgwlVUff5rwS/LUke0QgZJ0OkaOCxypDecaJXOt1tRO215GHOficoBE CzyMDvbdzHw5roMwhrDIo7zkaN3RAlp5m7RqS4uXLckPM54WGMwaNWzh3MuZJ5WaXgNiyuf9UHZFa DGSywyeDINGA0bEx8sX3L9mxQ4F3wydqoLZSXF7HUDk4G5yp71AeI89le05B6QWRLd4gELXK42noR qK3w/bJYC5xTo1zVnKjSQ7UJvaXqsJS7S13ROHrr2f+QuODOp1bPp0aJJsg7Wp71mFDrwL3FE9j0S MBNE1gGw==; Received: from authenticated user by zero.zsh.org with local id 1lxzpZ-0000T3-Ew; Mon, 28 Jun 2021 22:34:17 +0000 Authentication-Results: zsh.org; iprev=pass (mail.covisp.net) smtp.remote-ip=65.121.55.42; dmarc=none header.from=covisp.net; arc=none Received: from mail.covisp.net ([65.121.55.42]:24142) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lxzoh-000Pki-Dk; Mon, 28 Jun 2021 22:33:24 +0000 Content-Type: text/plain; charset=utf-8 Subject: Re: Paramater subsiution From: Lewis Butler In-Reply-To: Date: Mon, 28 Jun 2021 16:33:20 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <0E863B7C-7435-47C5-A7BE-6FFC470BEAE6@covisp.net> References: <0CCFA5D7-9723-481E-9E20-D96E7F28D717@covisp.net> To: Zsh Users X-Mailer: Apple Mail (2.3677.0.3.1.132) X-Seq: 26784 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 27 Jun 2021, at 16:47, Gamma wrote: > Jun 27, 2021 17:42:48 Lewis Butler : >=20 >> Given: >>=20 >> name=3D"file 1234 - name" >> echo ${I% - name} >>=20 >> I can easily get 'file', but how would I get "name" instead given = that: >>=20 >> o name and 1234 are variable lengths and values >> o "file" and " - " are constant across all the input >=20 > echo ${i##* - } > Removes the longest prefix ending with ' - '. >=20 > Check man zshexpn for more. I swear I knew that at one point, but missed it several times in reading = the man page. Thank you. --=20 =C9=B9=D7=9F=CA=87nq=D7=9F tel:+1.303.219.0564