zsh-users
 help / color / mirror / code / Atom feed
* substring extraction
@ 2006-05-08  7:32 Com MN PG P E B Consultant 3
  2006-05-08  8:07 ` Stephane Chazelas
  0 siblings, 1 reply; 3+ messages in thread
From: Com MN PG P E B Consultant 3 @ 2006-05-08  7:32 UTC (permalink / raw)
  To: zsh-users Mailinglist

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
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-08 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08  7:32 substring extraction Com MN PG P E B Consultant 3
2006-05-08  8:07 ` Stephane Chazelas
2006-05-08 15:29   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).