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

zsh equivalent to string manipulation with offset and length



Hi,

if have searched the manuals for hours now and didn't find anything
useful.

Say
string="abcdefghijklmnopqrstuvwxyz"

and i want to echo string from position 10 to 15. In bash i could do:
echo ${string:10:5}

but not in zsh? What is the zsh equivalent? This sort of string
manipulation is so widely used, why not make it the default in zsh, too?

Kind regards and thanks for any help

Chris

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