Hi,
Sorry for the little bit off-topic.
I have a script that has to performe a hash over a password. Problem is that sha512sum expects CTRL-D to be pressed to return to the command prompt.
I've searched all over Google, but either I didn't do the right search or there is nothing relevant about this.
Bottom line is that I need this command to print the password hash and returns to the shell automatically:
$ sha512sum | xargs echo "password" | cut -f2 -d' '
Any help would be appreciated.
Warm Regards, Mário Gamito
On Tue, Mar 11, 2008 at 10:35 AM, Mário Gamito gamito@gmail.com wrote: [...]
$ sha512sum | xargs echo "password" | cut -f2 -d' '
read x;echo "$x" | sha512sum | xargs echo "password" | cut -f2 -d' '
Hi Marcelo,
On Tue, Mar 11, 2008 at 12:52 PM, Marcelo Roccasalva < marcelo-centos@irrigacion.gov.ar> wrote:
On Tue, Mar 11, 2008 at 10:35 AM, Mário Gamito gamito@gmail.com wrote: [...]
$ sha512sum | xargs echo "password" | cut -f2 -d' '
read x;echo "$x" | sha512sum | xargs echo "password" | cut -f2 -d' '
Thank you for your answer, but unfortunately it still hangs waiting for the CTRL-D.
Any more ideas ?
Warm Regards, Mário Gamito
On Tue, Mar 11, 2008 at 12:58:03PM +0000, Mário Gamito wrote:
Hi Marcelo,
On Tue, Mar 11, 2008 at 12:52 PM, Marcelo Roccasalva < marcelo-centos@irrigacion.gov.ar> wrote:
On Tue, Mar 11, 2008 at 10:35 AM, Mário Gamito gamito@gmail.com wrote: [...]
$ sha512sum | xargs echo "password" | cut -f2 -d' '
read x;echo "$x" | sha512sum | xargs echo "password" | cut -f2 -d' '
Thank you for your answer, but unfortunately it still hangs waiting for the CTRL-D.
Not here. Could you show us the part of your script that uses sha512sum?
On Tue, Mar 11, 2008 at 12:35:19PM +0000, Mário Gamito alleged:
Hi,
Sorry for the little bit off-topic.
I have a script that has to performe a hash over a password. Problem is that sha512sum expects CTRL-D to be pressed to return to the command prompt.
I've searched all over Google, but either I didn't do the right search or there is nothing relevant about this.
Bottom line is that I need this command to print the password hash and returns to the shell automatically:
$ sha512sum | xargs echo "password" | cut -f2 -d' '
Any help would be appreciated.
Do you mean this? echo "password" | sha512sum
On Tue, 2008-03-11 at 09:01 -0700, Garrick Staples wrote:
On Tue, Mar 11, 2008 at 12:35:19PM +0000, Mário Gamito alleged:
Hi,
Sorry for the little bit off-topic.
I have a script that has to performe a hash over a password. Problem is that sha512sum expects CTRL-D to be pressed to return to the command prompt.
I've searched all over Google, but either I didn't do the right search or there is nothing relevant about this.
Bottom line is that I need this command to print the password hash and returns to the shell automatically:
$ sha512sum | xargs echo "password" | cut -f2 -d' '
Any help would be appreciated.
Do you mean this? echo "password" | sha512sum
You might try stdio re-direction:
passwd=<your_password> passwd <<EOF $passwd EOF unset passwd
<snip sig stuff>
HTH