The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 06-01-2008
danmero danmero is offline Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,431
Quote:
Originally Posted by mschwage View Post
The ${var%pattern} construct is a ksh (and perhaps bash) shell thing, not bourne shell or csh.
I use Bourne shell(/vin/sh)sh
Quote:
Originally Posted by mschwage View Post
[*]The thing on the righthandside of the % is a pattern, not a regexp.
Yes, however you can use regexp.
Code:
y=${x%.*.?}