[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems working with bash.



Jean Pierre LeJacq <jplejacq@quoininc.com> writes:

>    This will strip the shortest suffix that matches ".*"
> 
>       ${var%.*}
> 
>    This will strip the longest suffix that matches ".*"
> 
>       ${var%.*}

Oops.  ${var%%.*} strips the longest.  And using # instead of % will
strip from the beginning.


Guy


Reply to: