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

substring extraction



bash has the nice feature to extract a substring from a shell variable.
For example

   # bash example
   var=abcd
   echo ${var:1:2} # Start at offset 1, returns 2 characters

displays 

   bc

Is there an easy way to achieve a similar effect in zsh, without
reverting to external
tools such as awk or sed?

Ronald
 



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