X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E95BD3858413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1635090988; bh=iq7I606+MTT8RYl5x94BpTKrCU/weZl4gfuVvMCs7Wc=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vh75pKYeHGWa2Tnlk17UZfDJemasrKvau7ZmCN/a7hnv4PRNRP/WeD6oU60e8ybnT 8a66DvtpPzC/9pSZRPa2J2tMsnPZ543Qfha5Q5WNc8sLRararXPR9vg2BrCrFK32GB n5gFYyE/WeylI3sYOcM15IAoOafPc2TudKqNN2u4= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0F694385840B ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gWcWNq7iajrmPizA9l6jz4jHJZuZMbpxmFDx9ZIhZUwc/oa7h10kKhZ6PZH2idB84x/mt51sHSFHf9W4zXff7ynNhDUGhEasWBZtQbgyLfo/qQ4lpw+lxvb9JikJqbczDl1zxMDT9wgMUWN7GXHYaCu6HoeoYf7oMsHmvcmUgJNvQr1K0ZW5hDFAIWUK3Kre+uR4ZujVbk6NDNrvlWgTKWkicGvbISlkK3nDFHIpW91SBvJeYmlVcWyNR5V168kcdS4m7MRYNdib7GJ+XKFK8vk6IsPVtUi5/cTK8jluK1GnX2+5alE225HmSKXAnPrsu6lytkn1WEDCyQIfXdic6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y+sd2bTwGtXxNIuQpCRLynIsKNiq1xKknL2CZBNv7ms=; b=n44z1d4WRTYvVumIA+5dgs7Q2XpJqWC3g9Z60NLPQfUYgh5Z8ya1stuxswUNYxM+YDW7S5dkZK3vOuKuDOPZaNvBMm7sSEJwWhPI/VbLWW/pJa1RzoojTUEPhYtbQwPY70wWVKXfPMprf5gvKVdSYUvFn369H1ieRLEY/PfV3QJ/1UgRKU2lZQqSGdWAa88zkQYYpX58/AtNbH2RXsP7EQk5WuaBF7uxgR6qNT0+pAhynA4VCkNZnEn9dJ+6ZiyXGGdk7rQhl7LxNCs2XA8Og/U5+jfVBvT08Mm+KR+EjhPkWhBxudD1N+w7F91w9yY7H15I23zuDFLr3wkiAFo9CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none To: "moss AT cs DOT umass DOT edu" , "'cygwin AT cygwin DOT com'" Subject: RE: rename using regexpr - is it possible? Thread-Topic: rename using regexpr - is it possible? Thread-Index: AdfIuUOso9jNYEzLT3q4kBenkCDOzgABlNuAAAvY6MA= Date: Sun, 24 Oct 2021 15:55:07 +0000 Message-ID: References: <1edc0f18-60e9-8769-e931-2875e910cb9e AT cs DOT umass DOT edu> In-Reply-To: <1edc0f18-60e9-8769-e931-2875e910cb9e@cs.umass.edu> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [7d63xtLW7aztHTWY9hGePUIzZlrCVpct] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 19a427f5-20ac-4aa0-5f69-08d99706a6ec x-ms-exchange-slblob-mailprops: mBRmoEB1kyLe14dbQMN7Chbs0d9bJoheR943LjjU8xVp1125usjZI5M6tItLNMngZ5Wvl4oZE+EBqJdWFobOIYOcFbYdKmr6vfprWdMc+Lw9fvZ0T7YGIN6H7X7jwFENq3L9ghSx26HW3B/lEITQ7RHhzluH7MiE1zbMtuuWQRkzMJHe8dxwJ4S7SmlqOK8h0Suyqp7AcUiozpA4YibnCH2k1wLfZh4AK5bibAcLd2cUr61z5hPRoJ/uExouPzyYxLxeJzNbvyrTZJEq+e1t0L4Z50YH3fmiNxi/4fDwmvbxCeZNY8DP+MgXIlYUdjzkNLKYjQWuKTF4iEgEc3Lj8qV5g6jdkCubwcTwizXOOsNd+rz2W46VuWkdZvFntqq+Vk+vfky8AS/UuT1fs+Br+DQppnIxezYNAB9pt/pu/ypBnpD23ETpD8yD2wFPdUdnErfqNLu/OeUTau4kqmkEZQRemxeYSPVRq7jH97D8FW39DaKTS9OkxPeO6f46N9qXmYSXeygEkO3zqD7fgWQ9ksukMdyR362Icuhjixm5n7mh36ncXdcC9kAS3GMmfn+dwOMuGkkK94mV2+ana++oIWtYFHEK7Na8PcNviN41FEkuByqd5smPQCIh51i3u13GY6zqXMvUNuKFKrw1KWMxcYwmM8XIOCzTPHQ6iwyaSTns+WRgl22EyqDcfpZgP+sOaPl4Pzlq1qtzovwKZN9XjM1gJkvhqJwiKMfO3Fq71qkNv0fxzUPIAfsCu04rGlTDJ+Wwbr5gUn8= x-ms-traffictypediagnostic: DB6PR0302MB2743: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sdqKEWkiPrKae3IuTOTL9mMFmFnH97TwI5xzsOnKlgbRwO1vPBX2jXqYGKRYAC+9y75+tkW1vJrQf4mvgW1w4bx1GjU60CH2c+dKJ+Bj/VliacE97dAGWjCsNVzyObK9+JI+rfDNZjgntVmTNYqufAO3W8OwecSf1mrNklQ83gL0p3icKPbW6neg7HCyHys7I79W9xVzywSJAWOvHSxM0yyibMXArWsX81WhO8PeJcLEBamNFo81Yt1KrftNfUXbiOYXNyP86XJTIW3P+07bnelK2QRFbosXZ4IypZNsws6ckQ0FAFx7N350dFSbvH6yYkzVLRc33CimeQRm3JaTs00zfnv53EYWu1wJ3hrEBO1HPgsPgPTycFb7kvK0BxbkqxcuMRMIiCg+gBlDKBweAWMPyNxVd5E03HA+Jo1dxqjKPBSt4mNafl7jJdaph/Y4eGQK8TO9YQsaBCuuG58Ukuci+6g77Qp5l/yTqIiUv+y5yjxuFy4z347NjqyjaNd5FY1wb9j5MU5r5FfbQwTHYWwJAVsR2xr8nmplhjBpd10= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: tUMCURxp69XSb+3cgTLA7c78qaoLwS1wR1tgePpdQ6N2TOntQ42Aqfz4Ld1UTsCJac3chjaYVUEyKZP8/NnRw/WMXQWzxXW5aBWCeBy6Axhjd1uqrS0ftVjhZ8yqK9ujxPQsVSfHdGBTjU5PXikrcPZ7HYb52FwG/wfUZQCNat2IFg9OiePbDD2IhUiq9mI8eJqyTeI3jL3PdwTXHUVADYc9trh4c4DKsN5/gstyGz0NR5DLS6+Ztnd9U5A/xBciirqAEma62wgHUmjtip0cndyV9WRvBJPhGxj0n+Xvo1MnB1XhIvtgE4XsMlyJ6sJk3rhuQ6e+OQa+YDBzX1MIuxH2dzSULtPAuyCOIXZPjG6ttENGLo9EWWCEwA+XGZLYPbtXYaOQ6zFVJIO/inDW3ilAQ4TtE2mK7jBo9Re1chmZ3P+BrtYVC/Ju36Ml0rDJ2AkUHS+fd8lJl2L5/VtSCcMKjyl6QGct7+S4dngl+sA4y2WpkMitSbOcMxk4vMzvJZO30LwCVzg+/A4k3uBVNcwuS5JA83rJYPqWDgQlWtNSh5yNlsAtsDWgxoqPl/7MBVczg/0TYNyYDpq4PuR1W1MMfZeMQY2/oh3FZs63IbgfrakBM1JBb2H6V9wQmBwnW2Sefpy6K9nk8DS6PSlotkyw8wSDACAhDXWto3mH6bJA3nUO4b5Gx9zmdGD2fMryfCjsDpy924Oxw5OAT51rXg== MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB6PR03MB3013.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 19a427f5-20ac-4aa0-5f69-08d99706a6ec X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2021 15:55:07.4633 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0302MB2743 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Fergus Daly via Cygwin Reply-To: Fergus Daly Cc: Fergus Daly Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" >> I might be wrong but: >> The Cygwin implementation of rename seems completely different from "the" (my) Linux version. >> (Almost unique? Otherwise the matching in Cygwin of all syntax - >> vocab, switches, outcomes - to Linux, seems almost perfect.) >> Can I rename a set of files *.d (say) as filename.d -> XXfilename.d? >> In Linux this would be achieved by >> $ rename 's/^/XX/g' ./*.d >> whereas in Cygwin >> $ rename ^ XX *.d >> (and all similar attempts) fails. >> Thank you. > You're confusing perl-rename with util-linu rename. > The former, which seems to be what you want, can be installed using cpan (install File::Rename), > assuming you have perl installed. > It will put its rename command in /usr/local/bin, presumably taking precedence over the util-linux one in /usr/bin. > It further seems that "normally" these two have different names, like rename.ul and prename, > and /etc/alternatives is used to set up the rename command. > This required some web searching to determine ... > Cheers - Eliot Perfect. Worked like a dream. All in place, and naming managed. Thanks so much. Fergus -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple