[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] No tilde expansion in [[..]] when reading input with rea
Re: [Help-bash] No tilde expansion in [[..]] when reading input with read
Mon, 25 Feb 2013 09:38:59 +0800
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