zsh-users
 help / color / mirror / code / Atom feed
* Removing leading paces
@ 2010-04-13 22:29 Thorsten Kampe
  2010-04-13 22:36 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Kampe @ 2010-04-13 22:29 UTC (permalink / raw)
  To: zsh-users

Quick question: how can I remove leading space from a string (for 
example: string="   456")?

Thorsten





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

* Re: Removing leading paces
  2010-04-13 22:29 Removing leading paces Thorsten Kampe
@ 2010-04-13 22:36 ` Mikael Magnusson
  2010-04-14  7:03   ` Thorsten Kampe
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2010-04-13 22:36 UTC (permalink / raw)
  To: Thorsten Kampe; +Cc: zsh-users

On 14 April 2010 00:29, Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> Quick question: how can I remove leading space from a string (for
> example: string="   456")?
>
> Thorsten

${string## #} seems to work.

-- 
Mikael Magnusson


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

* Re: Removing leading paces
  2010-04-13 22:36 ` Mikael Magnusson
@ 2010-04-14  7:03   ` Thorsten Kampe
  0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Kampe @ 2010-04-14  7:03 UTC (permalink / raw)
  To: zsh-users

* Mikael Magnusson (Wed, 14 Apr 2010 00:36:03 +0200)
> On 14 April 2010 00:29, Thorsten Kampe <thorsten@thorstenkampe.de>
> wrote:
> > Quick question: how can I remove leading space from a string (for
> > example: string=" 456")?
> >
> 
> ${string## #} seems to work.

Right (in connection with "extendedglob"). Yesterday night I was trying 
"${string## }", "${string##  *}" and all that but it didn't work. Guess 
it was late :).

Thanks, Thorsten


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

end of thread, other threads:[~2010-04-14  7:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-13 22:29 Removing leading paces Thorsten Kampe
2010-04-13 22:36 ` Mikael Magnusson
2010-04-14  7:03   ` Thorsten Kampe

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).