You are not logged in.

#1 2021-04-05 20:44:25

tonimark
Member
Registered: 2021-04-05
Posts: 40

trouble registering at the forum-> typo in the question

since yesterday i had a big trouble registering  at the forum there was an impossible question to answer called:
date -u +%V$(uname)|sha384sum|sed 's/\W//g
i tried every singe shell , browser(emulator) , virtual machine , the bootable os on usb drive , the linux arch itself after reboot and even after a successful installation
the answer was always:
>
and yes it appeared that you should put a number or something but idk what to put the onyl choice was to CTRL-C and exit to terminal however i found on a forum a working command:
date -u +%V$(uname)|sha512sum|sed 's/\W//g
which appeared to worked out and outputed a working number it appears that there is a typo in the question that needs to be changed
change the value 384 to 512
try these 2 commands yourselves and see

Last edited by tonimark (2021-04-05 21:06:13)

Offline

#2 2021-04-05 20:49:42

loqs
Member
Registered: 2014-03-06
Posts: 19,016

Re: trouble registering at the forum-> typo in the question

date -u +%V$(uname)|sha384sum|sed 's/\W//g
date -u +%V$(uname)|sha384sum|sed 's/\W//g'

Note the single quote at the end.  The question asked has variants using sha256sum,sha384sum and sha512sum.

Offline

#3 2021-04-06 10:04:35

tonimark
Member
Registered: 2021-04-05
Posts: 40

Re: trouble registering at the forum-> typo in the question

loqs wrote:
date -u +%V$(uname)|sha384sum|sed 's/\W//g
date -u +%V$(uname)|sha384sum|sed 's/\W//g'

Note the single quote at the end.  The question asked has variants using sha256sum,sha384sum and sha512sum.

removed the mark '

Offline

#4 2021-04-06 13:10:57

loqs
Member
Registered: 2014-03-06
Posts: 19,016

Re: trouble registering at the forum-> typo in the question

tonimark wrote:

removed the mark '

Why?

Offline

#5 2021-04-06 19:34:58

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: trouble registering at the forum-> typo in the question

The single quote suppresses word splitting and escape parsing, but in this context the former is optional and does nothing. The latter is important because

$ set -x
$ date -u +%V$(uname)|sha384sum|sed s/\W//g
+ sha384sum
+ sed s/W//g   # <- look here
++ uname
+ date -u +%VLinux
ce688d4f585b6fab950960100952f74ad697c27e4610d47b0546a8d760fb7b7a28d99b04dbe10ddc7d776334965cd525  -
$ date -u +%V$(uname)|sha384sum|sed 's/\W//g'
+ sha384sum
+ sed 's/\W//g'
++ uname
+ date -u +%VLinux
ce688d4f585b6fab950960100952f74ad697c27e4610d47b0546a8d760fb7b7a28d99b04dbe10ddc7d776334965cd525

Note the trailing "  -" did not get removed if you abstain from quotes.

However, without the *unbalanced* quotes the command no longer fails with a syntax error or a multiline continuation prompt. Instead it quietly gives you the wrong answer.

Last edited by eschwartz (2021-04-06 19:35:19)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2021-04-06 20:05:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: trouble registering at the forum-> typo in the question

I just logged out and tried to register - I was being asked for the sha512sum and the question has the correct syntax including the trailing "'" and pasting it verbatim into a shell of course yields the proper result.

Offline

#7 2021-04-06 21:23:06

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: trouble registering at the forum-> typo in the question

Well yes, because the question is:

What is the output of "date -u +%V$(uname)|sha384sum|sed 's/\W//g'"?(Required)

And there is a single quote followed by a double quote at the end. The double quote is prose (wrapping the entire code segment), the single quote is code. The problem is some people think that they should remove both single and double quotes, so they get into trouble.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2021-04-06 21:32:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: trouble registering at the forum-> typo in the question

I assume this(or sth. along that, eg. cnp mistake or mere oversight, assuming it's "sed's whatever"…) is what happened, but wanted to record that the OPs claim of a syntax error is not reproducible (ie. there isn't actually a bug on the page that other users just silently fix on registration)

Offline

Board footer

Powered by FluxBB