help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Sustitute to bash read or util-linux line in pure bash?


From: Daniel Mills
Subject: Re: [Help-bash] Sustitute to bash read or util-linux line in pure bash?
Date: Tue, 13 Mar 2018 12:33:50 -0400

On Tue, Mar 13, 2018 at 11:50 AM, Garreau, Alexandre <address@hidden
> wrote:

> I learned using read to split in lines is considered bad practive
> because of unportability and IFS stuff, then I discovered “line” from
> util-linux was doing something similar, while head/tail -n1 wasn’t, any
> idea of a similar way of doing this (like line or read but without them)
> in pure bash?
>
> read is POSIX and temporarily exporting IFS for it (IFS=: read -r ...) is
the correct way to
split a line. Other than that, I'm not sure what your intent is.

https://mywiki.wooledge.org/BashFAQ/001


reply via email to

[Prev in Thread] Current Thread [Next in Thread]