On Wednesday 18 July 2012 19:45:52 Allen Martin wrote:
> +MAJOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 1)
> +MINOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 2)
> +
> +printf "%02d%02d\\n" $MAJOR $MINOR

can be replaced with a single awk script:

$gas --version | awk '{
        gsub(/[.]/, " ", $NF)
        $0 = $NF
        printf "%02d%02d\n", $1, $2
        exit
}'
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to