Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Reading line by line
- X-seq: zsh-users 11380
- From: "djh" <henman@xxxxxxxxxxxxxx>
- To: <meino.cramer@xxxxxx>, <zsh-users@xxxxxxxxxx>
- Subject: Re: Reading line by line
- Date: Wed, 11 Apr 2007 16:00:38 +0900
- In-reply-to: Your message of Wed, 11 Apr 2007 07:38:00 +0100 <20070411063800.GA4996@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070411033311.GA6837@solfire> <461C5C81.20609@xxxxxxxxxx> <20070411063800.GA4996@xxxxxxxxxxxxxxx>
> > meino.cramer@xxxxxx wrote:
> > > Hi,
> > >
> > > how can I read line by line from a file of text?
>
> Most Unix tools (cut, paste, sed, awk...) read files lines by
> line, it's generally a bad idea to have the shell read the file
> by itself.
I disagree, one shouldn't have to load in heavy tools like sed and friends
if they aren't needed.
>
> [...]
> > while read theline
>
See Chapter 17 "Shell Builtin Commands"
- It explains the "read" builtin command and explains the options in gory detail.
Regards,
Darel Henman
Messages sorted by:
Reverse Date,
Date,
Thread,
Author