On 24.08.14 11:51, Richard W.M. Jones wrote:
On Sun, Aug 24, 2014 at 11:48:09AM +0100, Richard W.M. Jones wrote:
printf "hash = \"%s\"\n" hash; printf "sha1 = \"%s\"\n" sha1;
Or even better:
printf "hash = %S\n" hash; printf "sha1 = %S\n" sha1; yes it have \r in end end of the sha1 which need to be trim: hash = "6b109c761f67ff2fee123b435d25df71259e81d7" sha1 = "6b109c761f67ff2fee123b435d25df71259e81d7\r"
%S (capital S) causes the compiler to print escape sequences for non-printable characters.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v