From owner-freebsd-questions Mon Sep 25 6:13:14 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103]) by hub.freebsd.org (Postfix) with ESMTP id 3809037B424 for ; Mon, 25 Sep 2000 06:13:11 -0700 (PDT) Received: from bagabeedaboo.security.at12.de (dial-213-168-73-202.netcologne.de [213.168.73.202]) by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id PAA07489; Mon, 25 Sep 2000 15:13:04 +0200 (MET DST) Received: from localhost (localhost.security.at12.de [127.0.0.1]) by bagabeedaboo.security.at12.de (8.11.0/8.11.0) with ESMTP id e8PDCsT03017; Mon, 25 Sep 2000 15:12:54 +0200 (CEST) (envelope-from pherman@frenchfries.net) Date: Mon, 25 Sep 2000 15:12:54 +0200 (CEST) From: Paul Herman To: "Dimitri T." Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how do I get rid of that prefix?! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 25 Sep 2000, Dimitri T. wrote: > I have some hundreds of files with a filename starting with a specific > prefix (lets say 'abc') and I want to rename them and get rid of this > prefix. How do I do that? That would be /bin/sh trick number 673: for filename in abc*; do mv ${filename} ${filename#abc}; done -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message