What is the output of date -u +%W$(uname)|sha256sum|sed 's/\W//g' (on Arch Linux if it matters)?
How do I find that out?

  • The best way to find out what is to run it. The best way to find out why is to read the documentation of the three commands involved. – Gilles Jan 7 '11 at 18:34
  • 4
    Although, if you truly haven't seen the commands before, it might be a better idea to read the documentation first. One does not want to get into the habit of simply running any command they come across. – Steven D Jan 7 '11 at 20:04
date -u %W

Displays the current week of the year.


Displays the kernel name.


Generates a SHA-256 Hash Sum.

sed 's/\W//g'

Cuts out all non-word characters.

The |'s are redirecting the output of the first command to the appending command.

Enter the line in a terminal, f.e. gnome-terminal or xterm:

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

Depending on the date and the operating system installed, this will output different hashes, like this:


1. The 'uname' part

To answer the first question, the crucial thing is what uname without a parameter returns on Arch Linux. The man page does not define it, but uname Command says it is equivalent to uname -s:

-s   Displays the system name. This flag is on by default.

For -s, the man page says "print the kernel name". On Arch Linux uname returns


whereas on, for example, Cygwin uname returns something like:


2. The 'date' part

date -u +%W returns the week number. As the last part ("Linux") is a fixed string, the final output depends on which week the command line is run in (the hash is computed on for example "07Linux"). With this knowledge the output can also be computed on Cygwin.

3. An example

The week number for 2012-02-18 is 7 and date -u +%W`uname` returns (has a leading zero, but this is expected for the task at hand)


and the output from sha256sum (a SHA-2 hash) is:


On Cygwin it can be computed as:

echo '07Linux'|sha256sum|sed 's/\W//g'

(This actually worked when I tried to register at ArchWiki...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy