lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 9 Jul 2007 13:44:53 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Gabriel C <nix.or.die@...glemail.com>
cc:	Alexey Dobriyan <adobriyan@...il.com>,
	Jesper Juhl <jesper.juhl@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	sam@...enborg.org
Subject: Re: [PATCH] fixup binutils printing from scripts/ver_linux


On Jul 9 2007 13:39, Gabriel C wrote:
>
> Uhh :) Ok here an ugly one :
>
> $ ld -v | sed 's/.*version//;s/.*Binutils)//'|awk '{print $1}'|tr -d ' '
> 2.17.50.0.16.20070511
>
> $ echo 'GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)' | sed
> 's/.*version//;s/.*Binutils)//'|awk '{print $1}'|tr -d ' '
> 2.17.50.0.5
>
> $ echo 'GNU ld version 2.16.1' | sed 's/.*version//;s/.*Binutils)//'|awk
> '{print $1}'|tr -d ' '
> 2.16.1

That could be more beautiful :)
For example (untested)

#!/bin/bash
set -- (`ld -v`);
while [ "$1" != "version" -a $# -gt 0 ]; then
	shift;
done;
if [ "$1" == "version" ]; then
	version="$2";
fi;
if [ -z "$version" ]; then
	echo ld missing or could not figure.
else
	echo "BINUTILS: $version";
fi;


	Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ