scripts, shell

echo -n woes

It took me quite a while to realize that the following line does not do what you think it does:

$ echo '$1$CSmo96nX$G0PL/Cs/of5qDN2vMnyHp0' | openssl base64 | tr -d '\n'

You should always use the -n option if you want to make sure there is no spurious trailing newline:

$ echo -n '$1$CSmo96nX$G0PL/Cs/of5qDN2vMnyHp0' | openssl base64 | tr -d '\n'

(By the way, the encrypted message says just 'patata0' and it is not my password).

Or… is it?

Tested on two Linux systems (Fedora & Ubuntu) and one Snow Leopard.

2 Comments

  • On 05.20.10 rafacas said:

    I’m totally sure it’s your password :P

  • On 05.29.10 VTR1000 Lady said:

    In truth, immediately i didn

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields