top | item 7572736

(no title)

dredge | 12 years ago

For the command to match the description, shouldn't that be "echo -n"? Otherwise the signed string would include a trailing newline.

I do not expect this will make a material difference to the challenge - presumably you used the quoted commands to generate the answer.

discuss

order

pornel|12 years ago

There is no portable way to echo without a newline. Use printf instead.

jgrahamc|12 years ago

Meanwhile over in a Makefile...

    # Automatically figure out what echo options to use so that echo
    # '\r\n' actually just outputs the characters CR and LF and nothing
    # else. This is very shell dependent.

    ECHO_OPTIONS := -e -n -en
    ECHO :=
    $(foreach o,$(ECHO_OPTIONS),$(if $(call seq,$(shell echo $o '\r\n' | wc -
    c),2),$(eval ECHO := echo $o)))
    ifeq ($(ECHO),)
    $(error Failed to set ECHO, unable to determine correct echo command, 
    tried options $(ECHO_OPTIONS))
    endif

jkrems|12 years ago

Maybe they changed the description in the meantime, it now includes the newline, saying: "Proof I have your key\n"