Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
substring extraction
- X-seq: zsh-users 10226
- From: "Com MN PG P E B Consultant 3" <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>
- To: "zsh-users Mailinglist" <zsh-users@xxxxxxxxxx>
- Subject: substring extraction
- Date: Mon, 8 May 2006 09:32:50 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Thread-index: AcZycZwV9fdFQ0CqQECwEIfLCN3dnw==
- Thread-topic: 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