help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] No tilde expansion in [[..]] when reading input with rea


From: Chris Down
Subject: Re: [Help-bash] No tilde expansion in [[..]] when reading input with read
Date: Mon, 25 Feb 2013 09:38:59 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On 2013-02-25 12:24, Matthew Cengia wrote:
> On 2013-02-25 09:08, Chris Down wrote:
> > Here it is with the dependency on `awk' removed (no external dependencies):
> [...]
> >             done < /etc/passwd
>               done < <(getent passwd)
> [...]
> > Again, any suggestions for improvement welcome.
>
> Were I assuming Linux, I'd make the above substitution. I assume there
> are equivalents on other Unices, but don't know what they are.

I'd be inclined to say `getent' would probably make it less portable than
hardcoding /etc/passwd. Nevertheless, it's actually available in some form on
most BSDs and Solaris as well, at least, which should cover most use cases. My
main concern would be limited/embedded environments (busybox/etc) rather than
other Unices.

Best,

Chris



reply via email to

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