delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/26/06:51:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <004d01c0fe2d$38c1eaf0$6464648a@ca.boeing.com>
From: "Michael A. Chase" <mchase AT ix DOT netcom DOT com>
To: "malcolm.boekhoff" <malcolm DOT boekhoff AT actfs DOT co DOT uk>,
"Cygwin News Group" <cygwin AT sources DOT redhat DOT com>
References: <20010626103817 DOT A221 AT BOEKHOFF_M>
Subject: Re: How to extract suffix from a filename?
Date: Tue, 26 Jun 2001 03:44:12 -0700
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

There are a few possibilities.  Which is best for you depends on your
system.  Both bash and tcsh/csh have methods built in for chopping up
environment or shell variables.  You could also use sed in a pipeline if you
can't count on the shell you call having those abilities.

For bash, look in the manpage under "Parameter Expansion".  For tcsh, look
in the manpage for "modifiers".
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
----- Original Message -----
From: "malcolm.boekhoff" <malcolm DOT boekhoff AT actfs DOT co DOT uk>
To: "Cygwin News Group" <cygwin AT sources DOT redhat DOT com>
Sent: Tuesday, June 26, 2001 02:38
Subject: How to extract suffix from a filename?


> Okay, it's a silly question - how can I extract the suffix from a file
> name (I know I can use "basename" and "dirname" to get the file and
> directory components)?



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019