From mboxrd@z Thu Jan 1 00:00:00 1970 From: MARG Subject: Cutting Date: Sat, 10 Dec 2005 23:32:38 +0000 Message-ID: <439B6596.50104@tuxdoit.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="iso-8859-1" To: linux-admin@vger.kernel.org Hi, Hide like to extract the name and file verion of a tarball from its fil= e name in a bash script. Example: mysql-5.1.15.tar.bz2 I want to get only the "mysql-5.0.15" part. How can i get this. Note: the number of dots, varies. Example: qmail-1.03.tar.gz Only has one dots before the "tar.gz". MySQL has two. Any help would be apreciated. Warm regards, M=E1rio Gamito - To unsubscribe from this list: send the line "unsubscribe linux-admin" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html