Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: lost my space ...
- X-seq: zsh-users 10101
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: lost my space ...
- Date: Wed, 29 Mar 2006 10:33:46 +0100
- In-reply-to: <442A4D8E.4050206@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <442A4D8E.4050206@xxxxxxxxxxxxxxxxxx>
Marc Chantreux wrote:
> say this text as stdin :
>
> uid: suzan
> description: R&D leader,
> doesn't know unix
> but skilled in C programming
>
>
> the problem is that "while { read line }" will crunch the space at the
> begin of the line.
Use
IFS= read line
If you really want raw input lines, you might want the -r flag to read
as well.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author