Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: param modifier to strip _all_ suffixes?



Sweth Chandramouli wrote:

> 	is there a token modifier like :r that strips _all_ 
> suffixes of the form `.xxx', rather than just the last one--the 
> equivalent of ${PARAM%%.*} instead of just ${PARAM%.*}?  perhaps,
> if there isn't, :R could be given that meaning?

Combine it with `f':

  % a=foo.a.b.c
  % echo $a:fr
  foo


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author