On 14 October 2015 at 13:52, Derek Smithies <[email protected]> wrote:
> Hi
>
> On 14/10/15 13:49, Stephen Irons wrote:
>
> DISKTEMP=$(smartctl -A /dev/sdc | grep Temperature_Celsius | awk '{print
> $10}')
>
> I prefer to use $(...) rather than backticks `...` to capture stdout
> from a command pipeline into a shell variable.
>
>
> Why $( ) instead of backticks ???
>
I consider command substitution to be similar to parameter expansion
${...} and arithmetic expansion $((...)), and different from quoting.
So I prefer to use syntax that reflects this.
Stephen Irons
> Derek.
>
> --
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users