Re: Assigning command output to a variable

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

 



On Mon, Nov 19, 2012 at 12:36 PM, Eric Blake <eblake@xxxxxxxxxx> wrote:

> You can avoid the command substitution fork by using read:
>
> { read redhat_release < /etc/redhat-release; } 2>/dev/null
>
> Whether that's deemed any simpler, though, is a matter of taste.  Not to
> mention that use of 'read' like this is limited to cases where you know
> you are reading a one-line file (when present).

I believe this is the case... so this is an option.

Cheers

Adam

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux